:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --panel: #fafafc;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #aeaeb2;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-tint: rgba(0, 113, 227, 0.08);
  --blue-soft: rgba(0, 113, 227, 0.16);
  --green: #1d832d;
  --green-tint: rgba(40, 205, 65, 0.13);
  --orange: #b25000;
  --orange-tint: rgba(255, 149, 0, 0.14);
  --red: #d70015;
  --red-tint: rgba(255, 59, 48, 0.1);
  --purple: #8944ab;
  --purple-tint: rgba(175, 82, 222, 0.12);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.06);
  --sep: rgba(0, 0, 0, 0.08);
  --r-xl: 20px;
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 7px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.18);
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-padding-top: 72px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }

.test-notice {
  max-width: 1152px;
  margin: 16px auto 0;
  padding: 10px 16px;
  color: #854000;
  background: #fff3df;
  border: 1px solid #f2d6ab;
  border-radius: 10px;
  font-size: 13px;
}
@media (max-width: 1200px) { .test-notice { margin-left: 16px; margin-right: 16px; } }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sep);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f8cff, #0058c7);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.topnav { display: flex; gap: 2px; flex: 1; }

.topnav a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.topnav a:hover { color: var(--text); background: var(--fill-2); }
.topnav a.active { color: var(--text); background: var(--fill); font-weight: 600; }

.identity {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.identity:hover { background: var(--fill-2); }

.dev-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-tint);
  padding: 1px 6px;
  border-radius: 999px;
}

/* ---------- 布局 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 24px 24px 120px; }
.page-narrow { max-width: 600px; margin: 0 auto; }
.page-mid { max-width: 920px; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}

.card-pad { padding: 22px 24px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.page-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack > * + * { margin-top: 12px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}

.label .req { color: var(--red); margin-left: 2px; }

.input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--fill-2);
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.input:hover { background: rgba(118, 118, 128, 0.1); }

.input:focus {
  outline: none;
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

textarea.input { resize: vertical; min-height: 64px; line-height: 1.5; }
.input-time { font-variant-numeric: tabular-nums; }

.time-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.time-range > span { color: var(--text-3); }

.hint { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.5; }

/* 分段选择 */
.seg {
  display: flex;
  background: var(--fill);
  padding: 2px;
  border-radius: 9px;
  gap: 2px;
}

.seg button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, box-shadow 0.15s;
}

.seg button.on {
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(0, 0, 0, 0.04);
}

.seg-sm button { padding: 4px 8px; font-size: 12.5px; }

/* 选项胶囊 */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  border: 1px solid transparent;
  background: var(--fill-2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.chip:hover { background: var(--fill); }
.chip.on { background: var(--blue); color: #fff; font-weight: 600; }

/* 加减器 */
.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--fill-2);
  border-radius: 9px;
  padding: 2px;
}

.stepper button {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.stepper button:hover:not(:disabled) { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

.stepper span {
  min-width: 56px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 开关 */
.switch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
}

.switch-row + .switch-row { border-top: 1px solid var(--sep); }
.switch-row .t { font-size: 13.5px; font-weight: 500; }
.switch-row .d { font-size: 12px; color: var(--text-2); margin-top: 1px; }

.switch {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 25px;
  margin-top: 1px;
}

.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.22);
  transition: background 0.2s;
  pointer-events: none;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}

.switch input:checked + i { background: #34c759; }
.switch input:checked + i::after { transform: translateX(17px); }

/* ---------- 按钮 ---------- */
.btn {
  border: none;
  background: var(--fill-2);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.btn:hover:not(:disabled) { background: var(--fill); }
.btn-primary { background: var(--blue); color: #fff; font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--blue-hover); }
.btn-primary-danger, .btn-primary-danger:hover:not(:disabled) { background: var(--red); }
.btn-outline { background: #fff; border: 1px solid var(--sep); }
.btn-outline:hover:not(:disabled) { background: var(--fill-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--fill-2); color: var(--text); }
.btn-link { background: transparent; color: var(--blue); padding: 4px 6px; }
.btn-link:hover:not(:disabled) { background: var(--blue-tint); }
.btn-danger { background: transparent; color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red-tint); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-lg { padding: 12px 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }

.btn.loading { position: relative; color: transparent !important; pointer-events: none; }

.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn:not(.btn-primary).loading::after { border-color: rgba(0, 0, 0, 0.15); border-top-color: var(--text-2); }

@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  border: none;
  background: transparent;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--text-2);
  font-size: 14px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.icon-btn:hover { background: var(--fill-2); color: var(--text); }

/* ---------- 标签 / 头像 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.5;
}

.tag-green { background: var(--green-tint); color: var(--green); }
.tag-blue { background: var(--blue-tint); color: var(--blue); }
.tag-gray { background: var(--fill); color: var(--text-2); }
.tag-orange { background: var(--orange-tint); color: var(--orange); }
.tag-red { background: var(--red-tint); color: var(--red); }
.tag-purple { background: var(--purple-tint); color: var(--purple); }

.avatar {
  --size: 28px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  color: #fff;
  font-size: calc(var(--size) * 0.36);
  font-weight: 600;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.avatar-guest { background: #c7c7cc; }

.person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.person .n { font-weight: 600; font-size: 13.5px; }
.person .p { font-size: 12px; color: var(--text-2); }

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fill-2);
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  max-width: 100%;
}

.person-chip .avatar { --size: 22px; }
.person-chip .x { border: none; background: none; color: var(--text-3); padding: 0 2px; font-size: 13px; }
.person-chip .x:hover { color: var(--red); }

/* ---------- 弹窗 / 提示 ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.18s;
}

.backdrop.open { opacity: 1; }

.dialog {
  background: var(--card);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-pop);
  transform: scale(0.97);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.backdrop.open .dialog { transform: none; }
.dialog-wide { max-width: 560px; }

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 6px;
}

.dialog-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.dialog-body { padding: 10px 20px 20px; overflow-y: auto; }

.dialog-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 10px);
  z-index: 400;
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  max-width: calc(100vw - 32px);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-2);
}

.empty .big { font-size: 34px; margin-bottom: 8px; }
.empty .t { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }

.loading-page { padding: 80px 0; text-align: center; color: var(--text-3); }

.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: var(--fill-2);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.notice-blue { background: var(--blue-tint); color: #0050a0; }
.notice-orange { background: var(--orange-tint); color: var(--orange); }

/* 会议信息块 */
.info-block {
  background: var(--fill-2);
  border-radius: var(--r-lg);
  padding: 4px 14px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13.5px;
}

.info-row + .info-row { border-top: 1px solid var(--sep); }
.info-row .k { color: var(--text-2); width: 56px; flex-shrink: 0; font-size: 12.5px; }
.info-row .v { flex: 1; min-width: 0; font-weight: 500; word-break: break-all; }
.info-row .v.code { font-family: var(--mono); font-size: 16px; font-weight: 600; letter-spacing: 0.04em; }

/* ---------- 新建排期 ---------- */
.builder {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.builder-side { padding: 6px 0; }

.side-sec { padding: 16px 22px; }
.side-sec + .side-sec { border-top: 1px solid var(--sep); }

.sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.sec-no {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.sec-head .aside { margin-left: auto; font-weight: 500; font-size: 12.5px; color: var(--text-2); }

.who-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: var(--fill-2);
  border-radius: var(--r-md);
}

.who-row + .who-row { margin-top: 8px; }
.who-row .role { font-size: 12px; color: var(--text-2); width: 44px; flex-shrink: 0; }

/* 月历 */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-head .m { font-size: 13.5px; font-weight: 600; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-wd { font-size: 11px; color: var(--text-3); padding: 4px 0; }

.cal-day {
  border: none;
  background: transparent;
  aspect-ratio: 1;
  max-height: 40px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  position: relative;
}

.cal-day:hover:not(:disabled) { background: var(--fill-2); }
.cal-day.weekend { color: var(--text-2); }
.cal-day.today::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--blue);
}

.cal-day.on { background: var(--blue); color: #fff; font-weight: 600; }
.cal-day.on.today::after { background: #fff; }
.cal-day:disabled { color: var(--text-3); opacity: 0.6; cursor: default; }

.paste-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* 右侧画布：桌面端跟随滚动，左侧改设置时始终能看到预览 */
.canvas { padding: 20px 22px 22px; min-height: 520px; }

@media (min-width: 1025px) {
  .canvas {
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 76px - 92px);
    overflow-y: auto;
  }
}

.canvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.canvas-title { font-size: 16px; font-weight: 600; }

.legend { display: flex; gap: 12px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

.day-cols {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}

.day-col {
  background: var(--panel);
  border: 1px solid var(--sep);
  border-radius: var(--r-lg);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  scroll-snap-align: start;
}

.day-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 4px 6px;
  white-space: nowrap;
}

.day-col-head .d { font-size: 14px; font-weight: 600; }
.day-col-head .w { font-size: 12px; color: var(--text-2); margin-left: 4px; font-weight: 500; }
.day-col-head .n { font-size: 11.5px; color: var(--text-3); }

.day-col-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 6px;
}

.slot-chip {
  border: 1px solid var(--sep);
  background: #fff;
  border-radius: 10px;
  padding: 7px 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}

.slot-chip:hover { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.slot-chip .t { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.slot-chip .m { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-chip.assigned { border-color: rgba(0, 113, 227, 0.4); background: #f4f9ff; }
.slot-chip.assigned .m { color: var(--blue); font-weight: 500; }
.slot-chip.busy { background: repeating-linear-gradient(-45deg, #f6f6f8, #f6f6f8 6px, #efeff2 6px, #efeff2 12px); border-style: dashed; }
.slot-chip.busy .t { color: var(--text-2); font-weight: 500; }
.slot-chip.warn { border-color: rgba(255, 149, 0, 0.6); }
.slot-chip.past { opacity: 0.45; text-decoration: line-through; }

.add-slot {
  border: 1px dashed rgba(0, 0, 0, 0.16);
  background: transparent;
  border-radius: 10px;
  padding: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}

.add-slot:hover { color: var(--blue); border-color: var(--blue); }

/* 底部操作条 */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--sep);
  padding-bottom: env(safe-area-inset-bottom);
}

.actionbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.actionbar .sum { font-size: 14px; font-weight: 600; }
.actionbar .warn { font-size: 12px; color: var(--orange); margin-top: 1px; }

/* ---------- 受邀人预约页 ---------- */
.hero { padding: 24px; }
.hero h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; margin: 10px 0 12px; }
.hero .desc { font-size: 14px; color: var(--text-2); margin-top: 12px; white-space: pre-line; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-2);
}

.hero-meta span {
  background: var(--fill-2);
  padding: 3px 10px;
  border-radius: 999px;
}

.mine-card {
  border: 1.5px solid var(--blue-soft);
  background: linear-gradient(180deg, #f5f9ff, #fff);
}

.date-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
}

.date-tabs::-webkit-scrollbar { display: none; }

.date-tab {
  flex-shrink: 0;
  border: 1px solid var(--sep);
  background: #fff;
  border-radius: 14px;
  padding: 8px 14px;
  text-align: center;
  min-width: 76px;
}

.date-tab .w { font-size: 11.5px; color: var(--text-2); }
.date-tab .d { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.date-tab .n { font-size: 11px; color: var(--green); font-weight: 500; }
.date-tab .n.none { color: var(--text-3); }
.date-tab.on { background: var(--text); border-color: var(--text); color: #fff; }
.date-tab.on .w, .date-tab.on .n { color: rgba(255, 255, 255, 0.75); }

.slot-list { display: flex; flex-direction: column; }

.slot-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.slot-row + .slot-row { border-top: 1px solid var(--sep); }
.slot-row .time { width: 92px; flex-shrink: 0; }
.slot-row .time b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; display: block; }
.slot-row .time span { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.slot-row .mid { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.slot-row .mid .names { color: var(--text); margin-top: 2px; }
.slot-row.dim .time b { color: var(--text-3); }
.slot-row.mine { background: #f5f9ff; }

.success-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green);
  font-size: 28px;
  display: grid;
  place-items: center;
  margin: 4px auto 12px;
}

/* ---------- 管理页 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }

.stat {
  background: var(--fill-2);
  border-radius: var(--r-lg);
  padding: 12px 14px;
}

.stat .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat .k { font-size: 12px; color: var(--text-2); }
.stat.warn .v { color: var(--orange); }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--sep); margin: 22px 0 14px; }

.tabs button {
  border: none;
  background: none;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs button.on { color: var(--text); font-weight: 600; border-color: var(--text); }

.day-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 14px 4px 8px;
  position: sticky;
  top: 56px;
  background: var(--bg);
  z-index: 5;
}

.mg-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) minmax(0, 220px) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 18px;
}

.mg-row + .mg-row { border-top: 1px solid var(--sep); }
.mg-time b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mg-time div { font-size: 12px; color: var(--text-2); }
.mg-people { display: flex; flex-direction: column; gap: 6px; }

.booker-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.release-btn { width: 22px; height: 22px; font-size: 11px; opacity: 0.55; }
.release-btn:hover { opacity: 1; color: var(--red); background: var(--red-tint); }
.booker-line .note { font-size: 12px; color: var(--text-2); width: 100%; padding-left: 30px; }

.mg-info { font-size: 12.5px; color: var(--text-2); }
.mg-info .code { font-family: var(--mono); color: var(--text); font-weight: 600; }
.mg-actions { display: flex; gap: 4px; justify-content: flex-end; }

.followup-item { padding: 18px 20px; }
.followup-item + .followup-item { border-top: 1px solid var(--sep); }
.followup-notes { font-size: 13.5px; white-space: pre-line; margin-top: 10px; }

.todo {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
}

.todo input[type="checkbox"] { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.todo.done .txt { color: var(--text-3); text-decoration: line-through; }
.todo .meta { font-size: 12px; color: var(--text-2); }

.act-edit {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto 28px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.act-edit .input { padding: 7px 10px; font-size: 13px; }

.owner-btn {
  border: none;
  background: var(--fill-2);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 12.5px;
  white-space: nowrap;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-btn.empty { color: var(--text-3); }

/* ---------- 工作台列表 ---------- */
.list-card { display: block; padding: 18px 20px; color: inherit; }
.list-card + .list-card { border-top: 1px solid var(--sep); }
.list-card:hover { background: var(--panel); }

.progress { height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }

/* 成员选择 */
.picker-list { max-height: 50vh; overflow-y: auto; margin: 10px -8px 0; }
.picker-dept { font-size: 12px; color: var(--text-2); padding: 10px 8px 4px; font-weight: 500; }

.picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: var(--r-md);
  text-align: left;
}

.picker-item:hover { background: var(--fill-2); }
.picker-item .check {
  margin-left: auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
}

.picker-item.on .check { background: var(--blue); border-color: var(--blue); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .builder { grid-template-columns: 1fr; }
  .mg-row { grid-template-columns: 96px minmax(0, 1fr) auto; }
  .mg-info { grid-column: 2 / 3; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar-inner { padding: 0 14px; gap: 10px; }
  .brand span:last-child { display: none; }
  .topnav { overflow-x: auto; scrollbar-width: none; }
  .topnav a { padding: 6px 9px; font-size: 13px; }
  .identity .nm { display: none; }
  .container { padding: 14px 14px 120px; }
  .card-pad, .hero { padding: 18px; }
  .side-sec { padding: 14px 18px; }
  .canvas { padding: 16px; }
  .day-cols { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible; }
  .actionbar-inner { padding: 10px 14px; gap: 10px; }
  .actionbar .warn, .actionbar .sum .muted { display: none; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .mg-row { grid-template-columns: 1fr auto; padding: 14px; }
  .mg-people, .mg-info { grid-column: 1 / -1; }
  .mg-actions { grid-row: 1; grid-column: 2; }
  .slot-row { padding: 14px; gap: 10px; }
  .slot-row .time { width: 76px; }
  .backdrop { align-items: flex-end; padding: 0; }
  .dialog, .dialog-wide {
    max-width: none;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    transform: translateY(24px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .act-edit { grid-template-columns: 20px minmax(0, 1fr) 28px; }
  .act-edit .owner-btn, .act-edit .due { grid-column: 2 / 3; }
}
