/* ==========================================================
   设计系统 · 深色 + 香槟金（晚会场景）
   ========================================================== */
:root {
  --bg: #08080B;
  --bg-2: #0E0E14;
  --panel: #14141B;
  --panel-2: #1A1A23;
  --panel-3: #21212C;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #F3F2F7;
  --text-2: #A9A8BA;
  --text-3: #6F6E82;
  --gold: #E9C88B;
  --gold-2: #C9A363;
  --gold-3: #F8EBCE;
  --brand: #E9C88B;
  --brand-2: #C9A363;
  --brand-3: #F8EBCE;
  --danger: #E4645C;
  --ok: #5BC48C;
  --warn: #E9B85C;
  --radius: 18px;
  --radius-sm: 12px;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-2: 0 18px 50px -12px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden 属性优先级最高，防止自定义 display 覆盖 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: rgba(233, 200, 139, 0.28); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: content-box; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-3), var(--brand));
  color: #17130B;
  border: 0;
  font-weight: 600;
  box-shadow: 0 8px 24px -8px rgba(233, 200, 139, 0.6);
}
.btn-primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, var(--brand-3), var(--brand)); }
.btn-ghost { background: transparent; }
.btn-danger { color: #FF9B94; border-color: rgba(228, 100, 92, 0.3); background: rgba(228, 100, 92, 0.08); }
.btn-danger:hover { background: rgba(228, 100, 92, 0.16); border-color: rgba(228, 100, 92, 0.5); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 40px; padding: 0; }
.btn-block { width: 100%; }

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 18px; }
.field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}
.field .hint { margin-top: 6px; font-size: 12px; color: var(--text-3); line-height: 1.6; }
/* label 右侧的小文字按钮，如「清除」 */
.mini-link { margin-left: 8px; font-size: 11.5px; color: var(--text-3); cursor: pointer; user-select: none; }
.mini-link:hover { color: var(--brand); text-decoration: underline; }
.input, .textarea, .select {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  font-size: 14px;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.7; }
.input:focus, .textarea:focus, .select:focus {
  border-color: rgba(233, 200, 139, 0.55);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(233, 200, 139, 0.1);
}
.input::placeholder, .textarea::placeholder { color: #55546A; }

/* 日期时间：空值时显示「点击选择」占位，点击弹出系统日历选择器 */
.dt-wrap { position: relative; }
.dt-wrap .dt-ph {
  position: absolute; inset: 0; display: flex; align-items: center;
  padding-left: 13px; font-size: 14px; color: #55546A;
  pointer-events: none; user-select: none;
}
.dt-wrap:not(.is-empty) .dt-ph { display: none; }
.dt-wrap.is-empty .dt { color: transparent; }
/* 日期/时间输入：声明深色配色，原生日历图标与弹层才会适配暗色主题 */
.input[type="datetime-local"], .input[type="date"], .input[type="time"] { color-scheme: dark; cursor: pointer; }
.input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.input[type="date"]::-webkit-calendar-picker-indicator,
.input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .55; padding: 2px; border-radius: 4px;
  transition: opacity .18s, background .18s;
}
.input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
.input[type="date"]::-webkit-calendar-picker-indicator:hover,
.input[type="time"]::-webkit-calendar-picker-indicator:hover { opacity: 1; background: rgba(233, 200, 139, .14); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.select option { background: #16161D; }

/* 开关 */
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: background 0.22s var(--ease);
  pointer-events: none;
}
.switch span::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  transition: transform 0.22s var(--ease);
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.switch input:checked + span { background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.switch input:checked + span::after { transform: translateX(18px); background: #201A0E; }

/* 分段选择 */
.seg { display: inline-flex; padding: 3px; background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 10px; gap: 2px; }
.seg button {
  height: 30px; padding: 0 14px; border-radius: 8px; font-size: 13px; color: var(--text-2);
  transition: all .18s var(--ease);
}
.seg button.is-active { background: rgba(255,255,255,.1); color: var(--text); box-shadow: var(--shadow-1); }

/* ---------------- 徽标 / 状态 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: .04em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--text-2);
  white-space: nowrap;
}
.badge-gold { background: rgba(233, 200, 139, 0.12); border-color: rgba(233, 200, 139, 0.3); color: var(--brand); }
.badge-ok { background: rgba(91, 196, 140, 0.12); border-color: rgba(91, 196, 140, 0.3); color: var(--ok); }
.badge-danger { background: rgba(228, 100, 92, 0.12); border-color: rgba(228, 100, 92, 0.3); color: #FF9B94; }
/* 演出状态：正在表演（金色 + 呼吸）/ 已表演（灰）/ 待表演（暗） */
.badge-live {
  background: rgba(233, 200, 139, 0.16); border-color: rgba(233, 200, 139, 0.55); color: #FFDDA6;
  box-shadow: 0 0 0 3px rgba(233, 200, 139, 0.08);
  animation: badgeBreath 2s ease-in-out infinite;
}
@keyframes badgeBreath {
  0%, 100% { box-shadow: 0 0 0 3px rgba(233, 200, 139, 0.08); }
  50% { box-shadow: 0 0 0 5px rgba(233, 200, 139, 0.02); }
}
.badge-done { background: rgba(155, 180, 215, 0.12); border-color: rgba(155, 180, 215, 0.28); color: #A9BEDC; }
.badge-pending { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.32); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; }
.dot-live { animation: pulse 1.8s infinite; color: var(--ok); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(91,196,140,.6); }
  70% { box-shadow: 0 0 0 7px rgba(91,196,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(91,196,140,0); }
}

/* ---------------- 提示 ---------------- */
.toast-layer { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: 12px;
  background: rgba(24, 24, 32, 0.94);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
  font-size: 13.5px;
  backdrop-filter: blur(14px);
  animation: toastIn 0.28s var(--ease);
  max-width: min(90vw, 460px);
}
.toast.is-out { animation: toastOut 0.24s var(--ease) forwards; }
.toast-ok { border-color: rgba(91,196,140,.4); }
.toast-err { border-color: rgba(228,100,92,.45); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.97); } }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(4, 4, 8, 0.72);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s var(--ease);
}
.modal {
  width: min(520px, 100%);
  max-height: 88vh; overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  animation: modalIn .26s var(--ease);
}
.modal-head { padding: 20px 22px 0; font-family: var(--serif); font-size: 19px; letter-spacing: .02em; }
.modal-body { padding: 16px 22px; color: var(--text-2); font-size: 14px; }
.modal-foot { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* ---------------- 空态 / 骨架 ---------------- */
.empty { padding: 60px 20px; text-align: center; color: var(--text-3); font-size: 14px; }
.empty svg { opacity: .35; margin-bottom: 14px; }
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* 细金线 */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, rgba(233,200,139,.35), transparent); border: 0; margin: 0; }
