/* ============================================================
   预约 · 视觉层
   白蓝配色（浅色）+ 干净的卡片层次 + 大屏两列布局
   ============================================================ */

:root {
  --bg: #f4f7fc;
  --bg-2: #eaf0f9;
  --card: #ffffff;
  --card-2: #f2f6fd;
  --line: rgba(23, 43, 77, 0.09);
  --line-2: rgba(23, 43, 77, 0.16);
  --text: #142035;
  --text-2: #4b5c75;
  --text-3: #7b8aa3;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-dim: rgba(37, 99, 235, 0.10);
  --ok: #15803d;
  --warn: #b45309;
  --danger: #dc2626;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 22px 50px -24px rgba(23, 43, 77, 0.22);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* iOS PWA / 刘海屏安全区（非 PWA 环境下为 0，不影响桌面） */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(980px 560px at 82% -12%, rgba(37, 99, 235, 0.10), transparent 62%),
    radial-gradient(760px 500px at 4% 106%, rgba(96, 165, 250, 0.10), transparent 60%);
  z-index: 0;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 20px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; color: var(--text-2); font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }

/* ---------------- 登录 ---------------- */
.page-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(clamp(18px, 5vw, 48px) + var(--safe-top)) 16px calc(clamp(18px, 5vw, 48px) + var(--safe-bottom));
}

.auth-wrap { position: relative; z-index: 1; width: 100%; max-width: 420px; }

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(22px, 5vw, 32px);
  box-shadow: 0 26px 64px -30px rgba(23, 43, 77, 0.28);
}

.auth-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.auth-brand .mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 700; color: #ffffff;
  background: linear-gradient(160deg, #4c8ef7, #1d4ed8);
  box-shadow: 0 10px 22px -10px rgba(37, 99, 235, 0.55);
}
.auth-brand h1 { font-size: 21px; }
.auth-brand p { font-size: 13px; color: var(--text-3); margin-top: 3px; }

/* ---------------- 表单 ---------------- */
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-size: 12px; color: var(--text-3);
  margin-bottom: 6px; letter-spacing: 0.02em;
}

input[type="text"], input[type="password"], input[type="date"],
input[type="time"], input[type="number"], textarea, select {
  width: 100%;
  background: #fbfcfe;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
  appearance: none;
  -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 76px; line-height: 1.6; }

input:focus, textarea:focus, select:focus {
  border-color: rgba(37, 99, 235, 0.55);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input::placeholder, textarea::placeholder { color: #9aa8bd; }
input[type="date"], input[type="time"] { color-scheme: light; }

/* 自动填充时保持浅色，别出现突兀黄块 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #f4f8ff inset;
  box-shadow: 0 0 0 1000px #f4f8ff inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 13px 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.16s ease, background 0.16s ease, opacity 0.16s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary {
  background: linear-gradient(165deg, #4287f6, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 12px 26px -14px rgba(37, 99, 235, 0.6);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:active { transform: scale(0.985); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.3); }

.btn-ghost {
  background: #f4f8ff;
  border-color: var(--line-2);
  color: var(--text-2);
}
.btn-ghost:hover { background: #eaf2ff; color: var(--text); }

.form-err {
  display: none;
  font-size: 13px; color: var(--danger);
  background: #fff5f5;
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--r-sm);
  padding: 9px 12px; margin-bottom: 12px;
}
.form-err.show { display: block; }

.form-msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--danger); }

.auth-foot {
  margin-top: 20px; text-align: center;
  font-size: 12px; color: var(--text-3);
}

/* ---------------- 人机验证 ---------------- */
.cap-card {
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 12px;
  margin: 4px 0 16px;
  background: #fbfcfe;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cap-card.cap-pass {
  border-color: rgba(21, 128, 61, 0.4);
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.08);
}
.cap-card.shake { animation: capShake 0.34s ease; }
@keyframes capShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  55% { transform: translateX(5px); }
  80% { transform: translateX(-3px); }
}

.cap-stage {
  position: relative;
  width: 100%;
  height: 0;
  /* 320:150 —— 用 padding 撑高度，兼容不支持 aspect-ratio 的旧版 Safari */
  padding-top: 46.875%;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #eaf1fb;
  opacity: 0;
  transition: opacity 0.24s ease;
}
.cap-stage.ready { opacity: 1; }
.cap-stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}
#capPc {
  width: auto; height: auto;
  object-fit: contain;
  transition: top 0.18s ease;
  filter: drop-shadow(0 3px 7px rgba(23, 43, 77, 0.28));
}

.cap-track {
  position: relative;
  height: 46px;
  margin-top: 12px;
  border-radius: var(--r-sm);
  background: #eef4fd;
  border: 1px solid var(--line-2);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.cap-track:active { cursor: grabbing; }
.cap-track:focus-visible { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2); outline: none; }
.cap-track.done { border-color: rgba(21, 128, 61, 0.4); }
.cap-track.done .cap-knob { background: #e7f8ee; border-color: rgba(21, 128, 61, 0.45); color: var(--ok); }

.cap-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 46px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.2));
  pointer-events: none;
}
.cap-knob {
  position: absolute; left: 0; top: 0;
  width: 46px; height: 46px;
  border-radius: 9px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  background: #ffffff;
  box-shadow: 0 2px 8px -2px rgba(23, 43, 77, 0.2);
  display: grid; place-items: center;
  color: var(--accent);
  will-change: transform;
}
.cap-knob svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.cap-hint {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12.5px; color: var(--text-3);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cap-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px 10px; margin-top: 9px; min-height: 18px; flex-wrap: wrap;
}
.cap-state { font-size: 12px; color: var(--text-3); white-space: nowrap; flex: 0 0 auto; }
.cap-state.ok { color: var(--ok); }
.cap-state.warn { color: var(--warn); }
.cap-state.danger { color: var(--danger); }
.cap-msg { font-size: 12px; color: var(--text-3); text-align: right; line-height: 1.4; flex: 1 1 auto; min-width: 0; }
.cap-msg.gt-err { color: var(--danger); }
.cap-msg.gt-ok { color: var(--ok); }

/* ---------------- 应用外壳 ---------------- */
.app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding-top: calc(12px + var(--safe-top));
  padding-right: calc(clamp(16px, 3vw, 32px) + var(--safe-right));
  padding-bottom: 12px;
  padding-left: calc(clamp(16px, 3vw, 32px) + var(--safe-left));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
}
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.user-wrap { position: relative; }
.avatar-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  color: var(--accent);
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; overflow: hidden;
  display: grid; place-items: center;
  padding: 0;
  transition: border-color 0.16s ease, transform 0.12s ease;
}
.avatar-btn:hover { border-color: rgba(37, 99, 235, 0.4); }
.avatar-btn:active { transform: scale(0.96); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

.popover {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 232px;
  background: #ffffff;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: 0 20px 40px -18px rgba(23, 43, 77, 0.28);
  padding: 6px;
  animation: popIn 0.16s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.pop-head { padding: 10px 11px 11px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pop-name { font-size: 14px; font-weight: 600; }
.pop-mail { font-size: 12px; color: var(--text-3); margin-top: 2px; word-break: break-all; }
.popover button {
  width: 100%; text-align: left;
  background: none; border: 0; border-radius: 8px;
  color: var(--text-2); font-family: inherit; font-size: 14px;
  padding: 9px 11px; cursor: pointer;
}
.popover button:hover { background: #f2f7ff; color: var(--text); }
.popover button.danger:hover { background: #fff1f1; color: var(--danger); }
.popover form { margin: 0; }

/* ---------------- 内容 + 两列布局 ---------------- */
.content {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 40px) clamp(16px, 3vw, 32px) calc(100px + var(--safe-bottom));
  flex: 1;
}

.layout-2col {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}
.col-main { min-width: 0; }

.new-card {
  position: sticky;
  top: 78px;
}

@media (max-width: 980px) {
  .layout-2col, .admin-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .new-card { position: static; }
}

.page-head { margin-bottom: 14px; }
.page-head h2 { font-size: 22px; letter-spacing: -0.02em; }
.page-head .sub { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.mt-lg { margin-top: 32px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(18px, 3vw, 24px);
  box-shadow: 0 10px 28px -22px rgba(23, 43, 77, 0.35);
}
.new-card h2 { font-size: 18px; }
.new-card .sub { font-size: 13px; color: var(--text-3); margin: 3px 0 18px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  font-size: 13.5px;
  color: var(--text-2);
  border: 1px solid var(--line-2);
  background: #fbfcfe;
  border-radius: 999px;
  padding: 8px 15px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.chip:hover span { border-color: rgba(37, 99, 235, 0.35); color: var(--accent); }
.chip input:checked + span {
  color: #ffffff;
  background: linear-gradient(165deg, #4287f6, #1d4ed8);
  border-color: transparent;
  font-weight: 600;
}

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; gap: 0; } }

.new-card .btn-primary { margin-top: 6px; }

/* ---------------- 列表 ---------------- */
.list { display: flex; flex-direction: column; gap: 10px; }

.item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px 17px;
  box-shadow: 0 6px 20px -18px rgba(23, 43, 77, 0.3);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.item:hover { border-color: rgba(37, 99, 235, 0.22); box-shadow: 0 10px 26px -20px rgba(23, 43, 77, 0.4); }

.item-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.item-who {
  font-size: 13px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 7px;
}
.item-who .who-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 11px; color: var(--accent); overflow: hidden;
}
.item-who .who-avatar img { width: 100%; height: 100%; object-fit: cover; }
.item-type {
  font-size: 12px; color: var(--accent);
  background: var(--accent-dim);
  border-radius: 999px; padding: 2px 9px;
}
.item-time { font-size: 13px; color: var(--text); font-weight: 600; margin-top: 8px; }
.item-time small { font-weight: 400; color: var(--text-3); margin-left: 6px; }
.item-note {
  font-size: 13.5px; color: var(--text-2);
  margin-top: 6px; white-space: pre-wrap; word-break: break-word;
  line-height: 1.6;
}
.item-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px; flex-wrap: wrap;
}
.item-created { font-size: 12px; color: var(--text-3); }

.st {
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.st-pending { color: #b45309; background: #fff8eb; border-color: rgba(180, 83, 9, 0.22); }
.st-approved { color: #15803d; background: #f0fbf4; border-color: rgba(21, 128, 61, 0.22); }
.st-rejected { color: #dc2626; background: #fff2f2; border-color: rgba(220, 38, 38, 0.2); }

.admin-note {
  font-size: 12.5px; color: var(--text-2);
  background: #f6f9ff;
  border-left: 2px solid rgba(37, 99, 235, 0.35);
  border-radius: 6px;
  padding: 8px 11px; margin-top: 9px;
  white-space: pre-wrap; word-break: break-word;
}

.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.item-actions button {
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: #fbfcfe;
  color: var(--text-2); cursor: pointer;
  transition: all 0.15s ease;
}
.item-actions button:hover { background: #f2f7ff; color: var(--accent); border-color: rgba(37, 99, 235, 0.3); }
.item-actions button.ok {
  color: #ffffff; background: linear-gradient(165deg, #4287f6, #1d4ed8);
  border-color: transparent;
}
.item-actions button.ok:hover { filter: brightness(1.05); color: #fff; }
.item-actions button.no:hover { background: #fff2f2; color: var(--danger); border-color: rgba(220, 38, 38, 0.28); }

/* 删除按钮：默认低调，悬停变红，二次确认时实心红 */
.item-actions button.del { color: var(--text-3); }
.item-actions button.del:hover {
  color: var(--danger);
  background: #fff2f2;
  border-color: rgba(220, 38, 38, 0.28);
}
.item-actions button.del.confirm {
  color: #ffffff;
  background: #dc2626;
  border-color: transparent;
}
.item-actions button.del.confirm:hover { background: #b91c1c; color: #ffffff; }

.empty {
  text-align: center; color: var(--text-3);
  font-size: 13.5px; padding: 30px 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.55);
}
.skeleton {
  height: 72px; border-radius: var(--r);
  background: linear-gradient(90deg, #eef4fd, #f8fbff, #eef4fd);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- 弹窗 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 32, 53, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn 0.18s ease;
}
.modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 100%; max-width: 400px;
  max-height: 90dvh; overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 30px 60px -24px rgba(23, 43, 77, 0.35);
  animation: modalIn 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.modal-head h3 { font-size: 17px; color: var(--text); }
.modal-head .x {
  background: none; border: 0; color: var(--text-3);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px;
  border-radius: 6px;
}
.modal-head .x:hover { color: var(--text); background: #f2f7ff; }

.modal-foot { display: flex; gap: 10px; margin-top: 18px; }
.modal-foot .btn-ghost, .modal-foot .btn-primary { flex: 1; }

/* 裁剪 */
.crop-area {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%;   /* 正方形，兼容不支持 aspect-ratio 的浏览器 */
  max-width: 300px; margin: 0 auto;
  border-radius: var(--r);
  overflow: hidden;
  background: #eef4fd;
  border: 1px solid var(--line);
  touch-action: none;
  cursor: grab;
}
.crop-area:active { cursor: grabbing; }
.crop-area canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.crop-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 13px; color: var(--text-3);
  pointer-events: none;
}
.crop-empty[hidden] { display: none; }

.crop-tools {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
}
.crop-tools .btn-ghost { width: auto; flex: 0 0 auto; padding: 9px 14px; font-size: 13.5px; }
.crop-tools input[type="range"] {
  flex: 1; accent-color: var(--accent);
}
.hint { font-size: 12px; color: var(--text-3); margin-top: 12px; line-height: 1.6; }

/* ---------------- 审批页 ---------------- */
.review-card { max-width: 460px; margin: 0 auto; }
.review-meta {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 6px 14px;
  margin-bottom: 18px;
  background: #fbfcfe;
}
.rm-row {
  display: flex; gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.rm-row:last-child { border-bottom: 0; }
.rm-row > span { flex: 0 0 74px; color: var(--text-3); }
.rm-row > b { color: var(--text); font-weight: 500; white-space: pre-wrap; word-break: break-word; }

.review-actions { display: flex; gap: 10px; margin-top: 6px; }
.review-actions .btn-primary { flex: 1; }
.review-actions .btn-ghost { flex: 0 0 108px; }

.review-done {
  font-size: 14px; color: var(--text-2);
  background: #f6f9ff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}

.empty-big { text-align: center; padding: 24px 0; }
.empty-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--text-3); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px);
  z-index: 90;
  background: rgba(20, 32, 53, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: 18px;
  box-shadow: 0 18px 36px -16px rgba(23, 43, 77, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-width: calc(100vw - 40px);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.err { background: #b91c1c; border-color: rgba(255, 255, 255, 0.18); }
.toast-action {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 13px; border-radius: 999px;
  cursor: pointer; white-space: nowrap;
}
.toast-action:hover { background: rgba(255, 255, 255, 0.3); }

/* 忙碌状态条 */
.busy-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  margin-bottom: 18px;
  background: #fff8eb;
  border: 1px solid rgba(180, 83, 9, 0.20);
  border-radius: var(--r);
  font-size: 13.5px;
  color: #8a4a08;
  line-height: 1.55;
}
.busy-dot {
  flex: 0 0 auto;
  width: 8px; height: 8px; border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}
.busy-text { word-break: break-word; }

/* 时长选择：比类型 chips 小一号 */
.dur-chips { margin-bottom: 4px; }
.dur-chips .chip span { padding: 7px 13px; font-size: 13px; }

/* 改期按钮 */
.item-actions button.resch {
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.26);
  background: #f6f9ff;
}
.item-actions button.resch:hover { background: #e9f1ff; color: var(--accent-2); }

/* 回收站弹窗 */
.trash-card { max-width: 520px; }
.trash-list { max-height: 52vh; overflow-y: auto; padding-right: 2px; }
.trash-list .item { padding: 12px 14px; }

/* 加到日历按钮 */
.item-actions button.ics {
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.28);
  background: #f4f8ff;
}
.item-actions button.ics:hover { background: #e8f1ff; color: var(--accent-2); }

/* ---------------- 响应式微调 ---------------- */
@media (max-width: 380px) {
  body { font-size: 14.5px; }
  .cap-hint { font-size: 11.5px; }
  .content { padding-left: 14px; padding-right: 14px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
