:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --line: #e3e8f0;
  --line-soft: #eef1f7;
  --text: #17202e;
  --text-2: #48546a;
  --muted: #8792a6;
  --primary: #2563eb;
  --primary-soft: #eef3ff;
  --primary-dark: #1d4ed8;
  --green: #12874a;
  --green-soft: #e7f6ee;
  --orange: #c9730a;
  --orange-soft: #fdf2e2;
  --red: #cf3227;
  --red-soft: #fdecea;
  --gray: #74808f;
  --gray-soft: #f1f3f7;
  --purple: #6d4aef;
  --purple-soft: #f1edff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --shadow-lg: 0 16px 48px rgba(16, 24, 40, .18);
  --sidebar: 216px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.5px; line-height: 1.55; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfd6e3; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b6c0d0; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================== 骨架 ============================== */
#root { min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }
.side {
  width: var(--sidebar); flex: 0 0 var(--sidebar); background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 17px 16px 13px; display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #2563eb, #5b8ff9);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: -.5px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .25); flex: 0 0 30px;
}
.brand-name { font-weight: 650; font-size: 14px; letter-spacing: .1px; line-height: 1.3; }
.brand-sub { font-size: 11px; color: var(--muted); }
.nav { padding: 4px 10px 10px; flex: 1; overflow: auto; }
.nav-label { font-size: 11px; color: var(--muted); padding: 14px 9px 6px; letter-spacing: .6px; }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); font-size: 13.5px; margin-bottom: 2px; position: relative; transition: background .12s, color .12s;
}
.nav a:hover { background: var(--gray-soft); color: var(--text); }
.nav a.on { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav a.on::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav a .ic { width: 16px; height: 16px; display: grid; place-items: center; opacity: .8; }
.nav a .ic svg { width: 16px; height: 16px; }
.nav a.on .ic { opacity: 1; }
.nav .badge {
  margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; line-height: 16px;
  min-width: 17px; padding: 0 5px; border-radius: 9px; text-align: center; font-weight: 600;
}
.side-foot { border-top: 1px solid var(--line-soft); padding: 10px 14px; display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: 0 0 28px;
}
.side-foot .who { font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.side-foot .role { font-size: 11px; color: var(--muted); }
.icon-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 3px 8px; font-size: 11.5px;
  color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--gray-soft); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* 页面统一内边距与内容宽度：所有列表页共用同一左边界 */
.page {
  padding: 22px 26px 56px; width: 100%; max-width: 1600px; margin: 0 auto;
  min-width: 0; flex: 1 0 auto;
}
/* 员工端内容与顶栏同宽（topbar-in 也是 1180 + 22 内边距），保证左右边界对齐 */
.page-emp { max-width: 1180px; padding: 18px 22px 56px; }
.page-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; min-height: 34px;
}
.page-head h1 { font-size: 19px; margin: 0; font-weight: 650; letter-spacing: -.2px; }
.page-head .sub { font-size: 12.5px; color: var(--muted); position: relative; padding-left: 11px; }
.page-head .sub::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 3px; border-radius: 50%;
  background: #c2cad8; transform: translateY(-50%);
}
.page-head .spacer { flex: 1; }

/* 员工端顶栏 */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 0 22px; display: flex; align-items: center; gap: 14px; height: 58px; }
.topbar .brand { padding: 0; }
.topbar .brand-name { font-size: 13.5px; }
.topbar .tabs { display: flex; gap: 2px; flex: 1; }
.topbar .tabs a {
  padding: 7px 13px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; transition: background .12s;
}
.topbar .tabs a:hover { background: var(--gray-soft); }
.topbar .tabs a.on { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.topbar .me { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-2); }
.topbar .me .nm { font-weight: 600; color: var(--text); }

/* ============================== 按钮 ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 32px; padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fff; color: var(--text); cursor: pointer; font-size: 13px; white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { border-color: #c9d3e4; background: #fafbfd; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 550; box-shadow: 0 2px 6px rgba(37, 99, 235, .18); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-primary:disabled { box-shadow: none; }
.btn-danger { background: #fff; border-color: #f0c6c1; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #e6a9a2; }
.btn-solid-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-solid-danger:hover { background: #b42318; border-color: #b42318; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--gray-soft); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { height: 24px; padding: 0 7px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-link {
  background: none; border: none; color: var(--primary); cursor: pointer; padding: 2px 4px; font-size: 12.5px;
  border-radius: 5px;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }
.btn-link.muted { color: var(--muted); }

/* ============================== 表单 ============================== */
.inp, .sel, textarea.inp {
  width: 100%; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea.inp { height: auto; padding: 8px 10px; resize: vertical; min-height: 76px; line-height: 1.65; }
.inp:focus, .sel:focus, textarea.inp:focus { border-color: #9db9f7; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
.sel { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%238792a6' stroke-width='1.4' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 26px; }
input[type="date"].inp { padding-right: 6px; color: var(--text-2); }
input[type="date"].inp::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; margin-left: 2px; }
input[type="date"].inp::-webkit-calendar-picker-indicator:hover { opacity: .9; }
.field { margin-bottom: 13px; }
.field > label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; font-weight: 550; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.req::after { content: " *"; color: var(--red); }
.checkrow { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }

/* 筛选栏 */
.filters {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 13px;
  margin-bottom: 14px; box-shadow: var(--shadow);
}
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-row .sel, .filter-row .inp { width: auto; min-width: 120px; height: 32px; }
.filter-row .search { min-width: 200px; flex: 1 1 200px; max-width: 290px; }
.filter-row .spacer { flex: 1; min-width: 8px; }
.filter-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.date-range {
  display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 6px; height: 32px; background: #fff;
}
.date-range .inp { border: none; height: 30px; width: 120px; padding: 0 2px; box-shadow: none !important; font-size: 12.5px; }
.date-range .sep { color: #c2cad8; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-soft); }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 6px; padding: 2px 6px 2px 8px; font-size: 12px;
}
.chip b { font-weight: 600; }
.chip button { border: none; background: none; color: var(--primary-dark); cursor: pointer; opacity: .55; font-size: 13px; line-height: 1; padding: 0 1px; }
.chip button:hover { opacity: 1; }
.chip-clear { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }

/* ============================== 标签 ============================== */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 550; white-space: nowrap; line-height: 1;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; flex: 0 0 5px; }
.tag.no-dot::before { display: none; }
.t-green { background: var(--green-soft); color: #0d7a37; }
.t-orange { background: var(--orange-soft); color: #a35c00; }
.t-red { background: var(--red-soft); color: #b42318; }
.t-gray { background: var(--gray-soft); color: #5c6675; }
.t-blue { background: var(--primary-soft); color: var(--primary-dark); }
.t-purple { background: var(--purple-soft); color: #5b3fd1; }

/* ============================== 房间卡片 ============================== */
.room-grid {
  /* auto-fit：卡片少时铺满整行，不留下右侧空列 */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px; align-items: stretch;
}
.room-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative;
  transition: box-shadow .15s, border-color .15s;
}
.room-card:hover { box-shadow: 0 6px 20px rgba(16, 24, 40, .09); border-color: #d5dded; }
.room-card::before { content: ""; height: 3px; background: var(--green); display: block; }
.room-card.st-warn::before { background: #eda01d; }
.room-card.st-full::before { background: #e5484d; }
.room-card.st-maint::before { background: #b9c1cf; }
.room-card.st-maint .rc-body { opacity: .7; }
.rc-head { padding: 12px 14px 10px; border-bottom: 1px solid var(--line-soft); }
.rc-title { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rc-name { font-size: 15px; font-weight: 650; letter-spacing: -.15px; }
.rc-type { font-size: 11.5px; color: var(--text-2); background: var(--gray-soft); padding: 1px 7px; border-radius: 5px; }
.rc-scene { font-size: 11.5px; color: var(--muted); }
.rc-title > .tag { margin-left: auto; }

/* 人数 + 进度 + 加减放在独立一行，避免标题行拥挤 */
.rc-stat { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rc-count { display: flex; align-items: baseline; gap: 3px; flex: 0 0 auto; }
.rc-count b { font-size: 20px; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.5px; line-height: 1; }
.rc-count span { font-size: 12px; color: var(--muted); }
.rc-progress { flex: 1; min-width: 40px; display: flex; align-items: center; gap: 7px; }
.rc-progress .bar { flex: 1; margin: 0; }
.rc-progress .pct { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; width: 30px; text-align: right; }
.stepper { display: flex; gap: 4px; flex: 0 0 auto; }
.mini {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--text-2); font-size: 13px; line-height: 1; padding: 0;
}
.mini:hover { background: var(--primary-soft); border-color: #bdd0f8; color: var(--primary-dark); }
.mini:disabled { opacity: .4; cursor: not-allowed; }
.bar { height: 5px; border-radius: 4px; background: var(--gray-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--green); transition: width .2s; }
.st-warn .bar > i { background: #eda01d; }
.st-full .bar > i { background: #e5484d; }
.st-maint .bar > i { background: #b9c1cf; }

.rc-body { padding: 0 14px; flex: 1; }
.rc-sec { padding: 9px 0; border-top: 1px dashed var(--line-soft); }
.rc-sec:first-child { border-top: none; padding-top: 10px; }
.rc-sec-label { font-size: 11px; color: var(--muted); letter-spacing: .4px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.rc-sec-label .n { color: var(--text-2); font-weight: 600; }
.slot-grid { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.slot-line {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2);
  background: #f7f9fc; border: 1px solid var(--line-soft); border-radius: 6px; padding: 2px 8px; min-width: 0;
}
.slot-line .st { font-weight: 600; color: var(--text); white-space: nowrap; }
.slot-line .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.slot-line .use { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.slot-line .use::before { content: "·"; margin-right: 4px; color: #c6cedc; }
.slot-line .use.hot { color: var(--orange); font-weight: 600; }
.use-items { font-size: 12.5px; color: var(--text-2); line-height: 1.72; }
.use-items .b { color: var(--purple); font-weight: 550; }
.rc-foot {
  display: flex; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--line-soft);
  margin-top: auto; background: #fcfdff;
}
.rc-foot .btn { flex: 1; height: 30px; font-size: 12.5px; }

/* ============================== 面板 / 表格 ============================== */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel + .panel { margin-top: 14px; }

/* ---------------------------- 员工端：全部物品 ---------------------------- */
.emp-items { display: flex; flex-direction: column; }
.emp-item { display: flex; align-items: center; gap: 12px; padding: 9px 15px; border-bottom: 1px solid var(--line-soft); }
.emp-item:last-child { border-bottom: none; }
.emp-item:hover { background: #fafcff; }
.ei-media {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 8px; overflow: hidden;
  background: var(--gray-soft); display: grid; place-items: center;
}
.ei-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ei-main { flex: 1; min-width: 0; }
.ei-name { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ei-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.ei-num { flex: 0 0 auto; text-align: right; display: flex; align-items: baseline; gap: 4px; }
.ei-num b { font-size: 16px; font-weight: 680; font-variant-numeric: tabular-nums; }
.ei-num b.zero { color: var(--red); }
.ei-num span { font-size: 11.5px; color: var(--muted); }

/* ---------------------------- 员工页：管理员账号 ---------------------------- */
.admin-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 15px; margin-bottom: 14px;
  border-left: 3px solid var(--purple);
}
.ac-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  background: var(--purple-soft); color: #5b3fd1;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.ac-main { flex: 1; min-width: 0; }
.ac-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-name { font-weight: 650; font-size: 14px; }
.ac-you { font-size: 11px; color: var(--muted); }
.ac-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------------------------- 基础设置：字典 ---------------------------- */
.dict-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.dict-grid .panel + .panel { margin-top: 0; }
.dict-panel { display: flex; flex-direction: column; }
.dict-hint { padding: 9px 15px 0; font-size: 12px; color: var(--muted); line-height: 1.6; }
.dict-add { display: flex; gap: 7px; padding: 10px 15px 12px; }
.dict-add .inp { flex: 1; min-width: 0; height: 30px; }
.dict-add .btn { flex: 0 0 auto; }
.dict-list { border-top: 1px solid var(--line-soft); }
.dict-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 15px;
  border-bottom: 1px solid var(--line-soft); transition: background .12s;
}
.dict-item:last-child { border-bottom: none; }
.dict-item:hover { background: #fafcff; }
.di-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.di-name { font-weight: 600; font-size: 13px; }
.di-use { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.di-use.on { color: var(--orange); }
.di-lock {
  font-size: 10px; color: var(--primary-dark); background: var(--primary-soft);
  border-radius: 4px; padding: 0 5px; line-height: 16px; font-weight: 600; flex: 0 0 auto;
}
.di-act { display: flex; gap: 2px; flex: 0 0 auto; }
.di-act .btn-link:disabled { opacity: .4; cursor: not-allowed; text-decoration: none; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); }
.panel-head h3 { margin: 0; font-size: 13.5px; font-weight: 650; }
.panel-head .spacer { flex: 1; }
.panel-head .cnt { font-size: 12px; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.tbl th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; letter-spacing: .3px;
  padding: 9px 12px; background: #fafbfd; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:hover { background: #fafcff; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .actions { white-space: nowrap; text-align: right; width: 1%; }
.tbl .actions .btn-link + .btn-link { margin-left: 2px; }
.tbl .w-name { font-weight: 600; }
.tbl .muted { color: var(--muted); }
.tbl .clip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.tbl .nowrap { white-space: nowrap; }
.cell-flex { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ell { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .stack { display: flex; flex-wrap: wrap; gap: 3px 6px; }
.tbl .stack .item { font-size: 12px; color: var(--text-2); background: var(--gray-soft); border-radius: 4px; padding: 0 5px; line-height: 18px; }
.tbl tr.grp td { background: #f8fafd; padding: 9px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tbl tbody tr.grp:first-child td { border-top: none; }
.tbl tr.grp:hover { background: none; }
.tbl tr.grp .g-name { font-weight: 650; font-size: 12.8px; margin-right: 8px; }
.tbl tr.grp .g-tag {
  font-size: 11px; color: var(--text-2); background: #fff; border: 1px solid var(--line);
  border-radius: 5px; padding: 0 6px; margin-right: 8px; line-height: 17px; display: inline-block;
}
.tbl tr.grp .g-meta { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.room-group-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 15px; background: #f8fafd;
  border-bottom: 1px solid var(--line-soft); font-size: 12.5px; font-weight: 650;
}
.room-group-head .cnt { font-weight: 500; color: var(--muted); }
.room-group-head .loc-tag {
  font-size: 11px; font-weight: 500; color: var(--text-2); background: #fff; border: 1px solid var(--line);
  border-radius: 5px; padding: 0 6px; line-height: 17px;
}
.num.zero { color: var(--red); font-weight: 700; }
.num.low { color: var(--orange); font-weight: 650; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.room-grid > .empty, .task-grid > .empty, .panel > .empty {
  background: #fff; border-radius: var(--radius); padding: 64px 20px;
}
.room-grid > .empty, .task-grid > .empty { grid-column: 1 / -1; border: 1px dashed #dbe2ef; }
.empty .big { font-size: 26px; opacity: .28; display: block; margin-bottom: 8px; }

/* ============================== 任务大厅 ============================== */
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; height: 32px; }
.view-toggle button {
  border: none; background: #fff; padding: 0 12px; cursor: pointer; color: var(--text-2);
  font-size: 12.5px; display: flex; align-items: center; gap: 4px;
}
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button.on { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(262px, 1fr)); gap: 12px; align-items: stretch; }
.task-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px;
  transition: border-color .12s, box-shadow .12s;
}
.task-card:hover { border-color: #c8d6f0; box-shadow: 0 5px 18px rgba(37, 99, 235, .1); }
.tc-top { display: flex; align-items: flex-start; gap: 8px; }
.tc-name {
  font-weight: 650; font-size: 13.5px; line-height: 1.4; flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-id { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tc-meta { display: flex; align-items: center; gap: 6px; font-size: 11.8px; color: var(--muted); flex-wrap: wrap; }
.tc-meta .sep { color: #d3dae6; }
.tc-desc {
  font-size: 12.3px; color: var(--text-2); line-height: 1.6; min-height: 39px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tc-foot { display: flex; gap: 6px; margin-top: auto; padding-top: 9px; border-top: 1px dashed var(--line-soft); }
.tc-foot .btn { flex: 1; height: 29px; font-size: 12.5px; }
.off-shelf { opacity: .62; }
.reject-note {
  background: var(--red-soft); color: #b42318; border-radius: 6px; padding: 5px 9px; font-size: 11.8px; line-height: 1.55;
}
.bulk-bar {
  display: flex; align-items: center; gap: 10px; padding: 9px 15px; background: var(--primary-soft);
  border-bottom: 1px solid #dae6ff; font-size: 12.5px; color: var(--primary-dark);
}
.bulk-bar .spacer { flex: 1; }

/* ============================== 弹窗 ============================== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px 30px; overflow: auto;
  animation: fadein .14s ease;
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@keyframes popin { from { opacity: 0; transform: translateY(-8px) scale(.99) } to { opacity: 1; transform: none } }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 540px; max-width: 100%;
  animation: popin .16s ease; display: flex; flex-direction: column; max-height: calc(100vh - 90px);
}
.modal.wide { width: 740px; }
.modal.narrow { width: 430px; }
.modal-head { display: flex; align-items: center; padding: 15px 20px 12px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.modal-head .x { margin-left: auto; border: none; background: none; font-size: 19px; color: var(--muted); cursor: pointer; line-height: 1; padding: 0 2px; }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 16px 20px; overflow: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 15px; border-top: 1px solid var(--line-soft);
  background: #fcfdff; border-radius: 0 0 14px 14px;
}
.modal-foot .left { margin-right: auto; }
.detail-line { display: flex; gap: 12px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--line-soft); }
.detail-line:last-child { border-bottom: none; }
.detail-line .k { color: var(--muted); width: 76px; flex: 0 0 76px; font-size: 12.5px; }
.detail-line .v { flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.share-box { display: flex; gap: 6px; align-items: center; }
.share-box input { flex: 1; min-width: 0; }

/* ---------------------------- 房间详情弹窗 ---------------------------- */
.rd-hero {
  background: linear-gradient(135deg, #f6f9fe, #edf2fb);
  border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px 16px;
}
.rd-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-name { font-size: 16px; font-weight: 680; letter-spacing: -.2px; }
.rd-usage { display: flex; align-items: center; gap: 10px; flex: 1 1 180px; min-width: 160px; margin-left: 4px; }
.rd-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.rd-count b { font-size: 20px; font-weight: 680; color: var(--text); font-variant-numeric: tabular-nums; margin-right: 1px; }
.rd-usage .bar { flex: 1; }
.rd-pct { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; width: 34px; text-align: right; }

.rd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.rd-cell { background: #fafbfd; border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 13px; min-width: 0; }
.rd-k {
  font-size: 11.5px; font-weight: 650; color: var(--text-2); letter-spacing: .4px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.rd-k::before { content: ""; width: 3px; height: 11px; border-radius: 2px; background: var(--primary); opacity: .55; }
.rd-cnt { font-size: 11px; font-weight: 600; color: var(--text-2); background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; line-height: 16px; }
.rd-sec { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.rd-text { font-size: 13px; color: var(--text-2); line-height: 1.7; white-space: normal; word-break: break-word; }
.rd-tag {
  font-size: 10.5px; color: var(--purple); background: var(--purple-soft);
  border-radius: 4px; padding: 0 4px; margin-left: 2px;
}
.people { white-space: normal; display: flex; flex-direction: column; gap: 8px; }
.share-box { white-space: normal; }
.share-box input { font-size: 12px; color: var(--text-2); background: #f8fafd; }
.person {
  padding: 9px 12px; border: 1px solid var(--line-soft); background: #fafbfd;
  border-radius: 10px; min-width: 0;
}
.person:first-child { margin-top: 0; }
.person .p-top { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.person .nm { font-weight: 600; white-space: nowrap; }
.person .p-count {
  font-size: 11px; color: var(--orange); background: var(--orange-soft);
  border-radius: 5px; padding: 0 6px; line-height: 17px; font-weight: 600;
}
.person .p-task { color: var(--text-2); font-size: 12px; line-height: 1.6; margin-top: 3px; word-break: break-word; }
.person .p-hand { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.person.idle .nm { color: var(--text-2); font-weight: 550; }
@media (max-width: 720px) {
  .rd-grid { grid-template-columns: 1fr; }
  .rd-usage { margin-left: 0; }
}

/* 提示块（申请确认等） */
.note-box {
  background: var(--orange-soft); color: #8a4d00; border: 1px solid #f3dcb8;
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; line-height: 1.7;
}
.note-box.info { background: var(--primary-soft); color: var(--primary-dark); border-color: #d7e3ff; }

/* 进行中任务清单（申请弹窗） */
.run-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.run-item {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; background: #fcfdff;
}
.run-item .ri-top { display: flex; align-items: center; gap: 8px; }
.run-item .ri-name { font-weight: 600; font-size: 13px; }
.run-item .ri-meta { font-size: 11.8px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.run-item .ri-act { margin-left: auto; display: flex; gap: 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.run-item .ri-act button {
  border: none; background: #fff; font-size: 12px; padding: 4px 10px; cursor: pointer; color: var(--text-2);
}
.run-item .ri-act button + button { border-left: 1px solid var(--line); }
.run-item .ri-act button.on { background: var(--primary); color: #fff; font-weight: 600; }
.run-item.done { border-color: #bfe6ce; background: #f7fdf9; }

/* ============================== Toast ============================== */
#toast-root { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #1f2a3a; color: #fff; padding: 9px 16px; border-radius: 9px; font-size: 13px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .28); animation: slidein .16s ease; max-width: 460px;
}
.toast.err { background: #b42318; }
.toast.ok { background: #127a3c; }
@keyframes slidein { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }

/* ============================== 选择器 ============================== */
.picker { position: relative; }
.pk-panel {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 218px; overflow: auto; display: none;
}
.pk-panel.open { display: block; }
.pk-item { padding: 7px 11px; cursor: pointer; display: flex; align-items: center; gap: 7px; font-size: 13px; }
.pk-item:hover, .pk-item.hl { background: var(--primary-soft); }
.pk-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* 分配物品行 */
.itm-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.itm-row .sel { flex: 1; min-width: 0; }
.itm-row .qty { width: 74px; text-align: center; }
.itm-row .del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 15px; padding: 0 4px; }
.itm-row .del:hover { color: var(--red); }
.slot-edit-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.slot-edit-row .sel { flex: 1; }
.slot-edit-row .num-inp { width: 82px; text-align: center; }

/* ============================== 统计 ============================== */
.stat-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 15px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px;
}
.stat-card .lbl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-card .lbl::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--primary); opacity: .5; }
.stat-card .val { font-size: 25px; font-weight: 680; letter-spacing: -.6px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.stat-card .val small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat-card .foot { font-size: 11.5px; color: var(--muted); }
.stat-card.c-green .lbl::before { background: var(--green); }
.stat-card.c-blue .lbl::before { background: var(--primary); }
.stat-card.c-orange .lbl::before { background: var(--orange); }

/* ============================== 员工端 ============================== */
.emp-wrap { min-width: 0; }   /* 内边距由 #pg.page-emp 统一负责，避免双重缩进 */
.sec-label {
  font-size: 12px; color: var(--text-2); font-weight: 650; letter-spacing: .3px;
  margin: 2px 0 9px; display: flex; align-items: center; gap: 8px;
}
.sec-label .muted { font-weight: 400; font-size: 11.5px; }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 12px; align-items: stretch; }
.my-task {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.mt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mt-name { font-size: 14.5px; font-weight: 650; }
.mt-head .tid { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mt-body {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; font-size: 13px;
  padding: 10px 0; border-top: 1px dashed var(--line-soft); margin-bottom: 12px;
}
.mt-body .k { color: var(--muted); font-size: 11.5px; }
.mt-body .v { font-weight: 500; word-break: break-word; }
.mt-actions { display: flex; gap: 10px; align-items: center; margin-top: auto; }
.btn-done {
  height: 38px; padding: 0 24px; font-size: 14px; font-weight: 600; border-radius: 9px;
  background: var(--green); color: #fff; border: 1px solid var(--green); cursor: pointer;
  box-shadow: 0 3px 10px rgba(18, 135, 74, .22);
}
.btn-done:hover { background: #0f7040; }
.btn-done:disabled { opacity: .5; box-shadow: none; }
.hand-list { display: flex; flex-direction: column; gap: 8px; }
.hand-row { display: flex; gap: 8px; align-items: center; }
.hand-row .inp { height: 34px; }
.hand-row .inp.qty { width: 92px; text-align: center; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }
.info-cell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); }
.info-cell .k { font-size: 12px; color: var(--muted); }
.info-cell .v { font-size: 17px; font-weight: 650; margin-top: 3px; }

/* ============================== 登录页 ============================== */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 440px; background: #fff; }
.login-art {
  background: linear-gradient(155deg, #1b3a8a 0%, #2563eb 48%, #4f8cf7 100%); position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; color: #fff;
}
.login-art::after {
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; top: -220px; right: -180px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .22), transparent 62%);
}
.login-art::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to top, #000 10%, transparent 85%);
}
.login-art h2 { font-size: 30px; margin: 0 0 12px; letter-spacing: -.6px; position: relative; line-height: 1.3; }
.login-art p { margin: 0; opacity: .82; font-size: 13.5px; max-width: 430px; line-height: 1.8; position: relative; }
.login-art .feats { display: flex; gap: 18px; margin-top: 24px; position: relative; flex-wrap: wrap; }
.login-art .feats div { font-size: 12.5px; opacity: .8; }
.login-form { padding: 0 48px; display: flex; flex-direction: column; justify-content: center; }
.login-form h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.3px; }
.login-form .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 26px; line-height: 1.7; }
.login-form .inp { height: 40px; font-size: 14px; }
.login-form label { font-size: 12.5px; }
.login-err { background: var(--red-soft); color: #b42318; border-radius: 7px; padding: 8px 11px; font-size: 12.5px; margin-bottom: 12px; }
.login-tip { margin-top: 22px; font-size: 12px; color: var(--muted); line-height: 1.85; border-top: 1px dashed var(--line); padding-top: 15px; }

/* ============================== 公开页 ============================== */
.pub-wrap { min-height: 100vh; background: #eef1f7; padding: 0 0 40px; }
.pub-head { background: linear-gradient(135deg, #1e40af, #3b82f6); color: #fff; padding: 24px 18px 58px; }
.pub-head .pt { font-size: 20px; font-weight: 680; letter-spacing: -.3px; }
.pub-head .pm { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; font-size: 12px; }
.pub-head .pm span { background: rgba(255, 255, 255, .16); padding: 2px 9px; border-radius: 20px; }
.pub-body { max-width: 640px; margin: -42px auto 0; padding: 0 14px; }
.pub-card { background: #fff; border-radius: 14px; box-shadow: 0 6px 22px rgba(16, 24, 40, .1); padding: 16px; margin-bottom: 12px; }
.pub-card h3 { margin: 0 0 10px; font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.pub-card h3 .n { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.pub-big { display: flex; align-items: baseline; gap: 6px; }
.pub-big .v { font-size: 30px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.pub-big .c { color: var(--muted); font-size: 13px; }
.pub-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-slot { background: #f6f8fc; border-radius: 8px; padding: 7px 11px; font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.pub-slot b { font-size: 14px; }
.pub-list { display: flex; flex-direction: column; }
.pub-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.pub-row:first-child { border-top: none; }
.pub-row .nm { font-weight: 600; min-width: 56px; }
.pub-row .ds { color: var(--text-2); flex: 1; min-width: 0; font-size: 12.3px; line-height: 1.55; text-align: right; word-break: break-word; }
.pub-foot { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.pub-foot a { font-size: 12.5px; color: #64748b; padding: 7px 14px; border-radius: 8px; background: rgba(255, 255, 255, .7); }
.pub-foot a:hover { color: var(--primary); background: #fff; }
.pub-brand { text-align: center; font-size: 11.5px; color: #94a3b8; margin-top: 22px; }
.pub-foot-tip { text-align: center; font-size: 11.5px; color: #94a3b8; margin-top: 8px; }

/* ============================== 自适应 ============================== */
@media (max-width: 1240px) {
  .stat-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .room-grid { grid-template-columns: 1fr; }
  .mt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .side { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .page, .page-emp { padding: 16px 14px 56px; }
  .topbar-in { padding: 0 14px; gap: 8px; }
  .topbar .brand-name { display: none; }
  .topbar .tabs a { padding: 7px 9px; font-size: 12.5px; }
  .topbar .me .nm { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .mt-body { grid-template-columns: 1fr 1fr; }
}


/* ---------------------------- 移动端适配 ---------------------------- */
.mbar { display: none; }
.side-mask { display: none; }

@media (max-width: 860px) {
  .shell { display: block; }                 /* 侧边栏抽屉化后主体占满整行 */
  .mbar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 55;
    background: #fff; border-bottom: 1px solid var(--line); padding: 9px 12px;
  }
  .mb-btn {
    width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
    display: grid; place-items: center; cursor: pointer; color: var(--text-2); padding: 0;
  }
  .mb-btn:active { background: var(--gray-soft); }
  .mb-btn svg { width: 18px; height: 18px; }
  .mb-title { flex: 1; font-weight: 650; font-size: 14px; min-width: 0; }
  .side-mask.show {
    display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .42);
    z-index: 59; animation: fadein .15s ease;
  }
  /* 员工端顶栏：tabs 横向滑动不换行 */
  .topbar-in { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .topbar-in::-webkit-scrollbar { display: none; }
  .topbar .tabs { flex-wrap: nowrap; flex: 0 0 auto; }
  .topbar .tabs a { white-space: nowrap; padding: 7px 10px; }
  .topbar .me { flex: 0 0 auto; margin-left: 8px; }
  /* 弹窗贴边 */
  .modal-mask { padding: 12px 10px 18px; }
  .modal, .modal.wide, .modal.narrow { width: 100%; max-height: calc(100dvh - 30px); }
  .modal-body { padding: 14px 15px; }
  .modal-foot { padding: 10px 15px; }
  .modal-foot .btn { flex: 1 1 auto; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .filters { padding: 9px 11px; }
  .filter-row .search { max-width: none; }
  .page-head { gap: 8px; }
  .page-head h1 { font-size: 17px; }
}

@media (max-width: 480px) {
  .room-card .rc-foot { flex-wrap: wrap; gap: 6px; }
  .room-card .rc-foot .btn { flex: 1 1 30%; }
  .stat-cards { gap: 9px; }
  .date-range { flex-wrap: nowrap; }
}
