/* 寿宴桌数预算计算器 · 现代产品感 · 作用域 .t3-bday（深色仅改变量值） */
.t3-bday {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #1f2937;
  --sub: #667085;
  --line: #e4e7ec;
  --acc: var(--a);
  --acc-deep: #8f0e2e;
  --soft: rgba(190, 18, 60, .08);
  --gold: #b45309;
  --flame: #f59e0b;
  --ok: #15803d;
  --bad: #be123c;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 28px -14px rgba(16, 24, 40, .12);
  --ring: 0 0 0 3px rgba(190, 18, 60, .25);
  --hero-bg: linear-gradient(135deg, #7f1023, var(--a) 55%, #d94f6b);
  --hero-ink: #ffffff;
  --hero-sub: #ffe4e6;
  --hero-em: #ffd9a0;
  --svg-shadow: #f3d9c4;
  --svg-cream: #fde8e8;
  --svg-paper: #ffffff;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  padding: 20px 14px 46px;
  line-height: 1.7;
  font-size: 14px;
}
[data-theme='dark'] .t3-bday {
  --bg: #0b1220;
  --card: #121a2b;
  --ink: #e6edf7;
  --sub: #9fb0c9;
  --line: rgba(148, 163, 184, .18);
  --acc: #e8355c;
  --acc-deep: #be123c;
  --soft: rgba(232, 53, 92, .14);
  --gold: #f59e0b;
  --bad: #f472b6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -14px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px rgba(232, 53, 92, .3);
  --hero-bg: linear-gradient(135deg, #131c2e, #2a1220 60%, #3b1023);
  --hero-ink: #e6edf7;
  --hero-sub: #c9d4e5;
  --hero-em: #fda4af;
  --svg-shadow: #22304a;
  --svg-cream: #241520;
  --svg-paper: #121a2b;
}
.t3-bday * { box-sizing: border-box; }
.t3-bday .bd-shell { max-width: 1180px; margin: 0 auto; }

/* ---------- hero ---------- */
.t3-bday .bd-hero {
  display: flex; gap: 24px; align-items: center; justify-content: space-between;
  background: var(--hero-bg);
  border-radius: 16px; padding: 28px; color: var(--hero-ink);
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.t3-bday .bd-hero::after {
  content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(255, 255, 255, .18);
  border-radius: 12px; pointer-events: none;
}
.t3-bday .bd-badge {
  display: inline-block; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px; padding: 3px 14px; font-size: 13px; letter-spacing: 1px;
}
.t3-bday .bd-hero h1 {
  margin: 10px 0 6px; font-size: clamp(22px, 3.2vw, 30px); line-height: 1.35; font-weight: 800;
}
.t3-bday .bd-hero h1 em {
  font-style: normal; font-size: clamp(14px, 1.9vw, 18px); color: var(--hero-em); font-weight: 600;
}
.t3-bday .bd-sub { margin: 4px 0 10px; font-size: 14px; color: var(--hero-sub); max-width: 640px; }
.t3-bday .bd-sub b { color: var(--hero-em); }
.t3-bday .bd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.t3-bday .bd-tags span {
  font-size: 12.5px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  padding: 2px 10px; border-radius: 999px;
}
.t3-bday .bd-art { flex: 0 0 auto; background: var(--card); border-radius: 14px; padding: 10px; box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }

/* ---------- layout ---------- */
.t3-bday .bd-grid { display: grid; grid-template-columns: minmax(340px, 460px) 1fr; gap: 24px; margin-top: 24px; align-items: start; }
.t3-bday .bd-side { position: sticky; top: 14px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) {
  .t3-bday .bd-hero { flex-direction: column; text-align: center; }
  .t3-bday .bd-sub { margin-left: auto; margin-right: auto; }
  .t3-bday .bd-tags { justify-content: center; }
  .t3-bday .bd-art { max-width: 260px; }
  .t3-bday .bd-art svg { width: 100%; height: auto; }
  .t3-bday .bd-grid { grid-template-columns: 1fr; }
  .t3-bday .bd-side { position: static; }
}

/* ---------- form ---------- */
.t3-bday .bd-form {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 24px;
  box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s;
}
.t3-bday .bd-form:hover { box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 14px 30px -14px rgba(16, 24, 40, .16); }
.t3-bday .bd-fs { margin-bottom: 24px; }
.t3-bday .bd-fs:last-of-type { margin-bottom: 16px; }
.t3-bday .bd-fs h2 {
  font-size: 17px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700;
}
.t3-bday .bd-fs h2 i {
  font-style: normal; width: 24px; height: 24px; border-radius: 8px; background: var(--acc); color: #fff;
  font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.t3-bday .bd-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.t3-bday .bd-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
@media (max-width: 760px) {
  .t3-bday .bd-row2, .t3-bday .bd-row3 { grid-template-columns: 1fr; }
}
.t3-bday .bd-field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.t3-bday .bd-field label b { color: var(--acc); }
.t3-bday .bd-hint { margin: 6px 0 0; font-size: 12px; color: var(--sub); line-height: 1.5; }
.t3-bday .bd-ctl { display: flex; align-items: stretch; }
.t3-bday .bd-ctl input {
  flex: 1; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 10px 0 0 10px; padding: 0 12px;
  font-size: 15px; font-family: inherit; background: var(--card); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.t3-bday .bd-ctl input::placeholder { color: var(--sub); opacity: .7; }
.t3-bday .bd-ctl input:focus { outline: none; border-color: var(--acc); box-shadow: var(--ring); position: relative; z-index: 1; }
.t3-bday .bd-ctl i {
  font-style: normal; display: inline-flex; align-items: center; padding: 0 12px; font-size: 12.5px;
  background: var(--soft); color: var(--sub); border: 1px solid var(--line); border-left: 0; border-radius: 0 10px 10px 0;
}
.t3-bday .err { margin: 4px 0 0; font-size: 12px; color: var(--bad); min-height: 0; }
.t3-bday .bd-field.bad input { border-color: var(--bad); }
.t3-bday .bd-note { margin: 16px 0 0; font-size: 12.5px; color: var(--sub); background: var(--soft); border-radius: 10px; padding: 8px 12px; }
.t3-bday .bd-field-blank { display: none; }

.t3-bday .bd-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.t3-bday .bd-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px;
  height: 44px; padding: 0 20px; font-size: 14.5px; font-family: inherit; cursor: pointer; transition: .15s;
}
.t3-bday .bd-btn:hover { border-color: var(--acc); color: var(--acc); }
.t3-bday .bd-btn-go {
  background: linear-gradient(135deg, var(--acc), var(--acc-deep)); border: none; color: #fff;
  font-weight: 700; flex: 1; box-shadow: 0 6px 16px -6px var(--soft);
}
.t3-bday .bd-btn-go:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
.t3-bday .bd-btn-ghost { color: var(--sub); }
.t3-bday .bd-msg { margin: 12px 0 0; font-size: 13px; color: var(--sub); background: var(--soft); border-radius: 10px; padding: 8px 12px; }
.t3-bday .bd-msg.bad { color: var(--bad); background: rgba(244, 63, 94, .1); }

/* ---------- report ---------- */
.t3-bday .bd-report {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0 0 20px;
  box-shadow: var(--shadow); position: relative;
}
.t3-bday .bd-rp-head { text-align: center; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); position: relative; }
.t3-bday .bd-rp-head h2 { margin: 4px 0; font-size: 18px; letter-spacing: 3px; color: var(--ink); font-weight: 800; }
.t3-bday .bd-rp-no, .t3-bday .bd-rp-date { position: absolute; top: 24px; font-size: 12px; color: var(--sub); }
.t3-bday .bd-rp-no { left: 22px; }
.t3-bday .bd-rp-date { right: 22px; }

.t3-bday .bd-hero-num { text-align: center; padding: 18px 22px 6px; }
.t3-bday .bd-hero-num span { display: block; font-size: 12px; color: var(--sub); letter-spacing: 2px; margin-bottom: 2px; }
.t3-bday .bd-hero-num b {
  display: inline-block; font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; line-height: 1.2;
  background: linear-gradient(135deg, var(--acc), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}

.t3-bday .bd-rp-sec { padding: 16px 22px 4px; }
.t3-bday .bd-rp-sec h3 {
  font-size: 17px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; font-weight: 700;
}
.t3-bday .bd-rp-sec h3 i {
  font-style: normal; font-size: 12px; font-weight: 800; color: var(--acc); background: var(--soft);
  border-radius: 6px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
}
.t3-bday .bd-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.t3-bday .bd-kpi {
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; text-align: center; padding: 12px 8px;
}
.t3-bday .bd-kpi span { display: block; font-size: 12px; color: var(--sub); }
.t3-bday .bd-kpi b { display: block; font-size: 20px; color: var(--ink); line-height: 1.35; font-weight: 800; font-variant-numeric: tabular-nums; }
.t3-bday .bd-kpi em { font-style: normal; font-size: 11px; color: var(--sub); }
.t3-bday .bd-kpi.hot { background: var(--soft); border-color: var(--acc); }
.t3-bday .bd-kpi.hot b { color: var(--acc); }

.t3-bday .bd-tbwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t3-bday .bd-tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t3-bday .bd-tb th, .t3-bday .bd-tb td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.t3-bday .bd-tb th { border-top: 1px solid var(--line); }
.t3-bday .bd-tb thead th { background: var(--soft); color: var(--ink); font-size: 12.5px; font-weight: 700; }
.t3-bday .bd-tb tfoot td { background: var(--bg); font-weight: 700; }
.t3-bday .bd-tb td.num, .t3-bday .bd-tb th.num { text-align: right; font-variant-numeric: tabular-nums; }
.t3-bday .bd-tb tr.cur td { background: rgba(245, 158, 11, .12); }
@media (max-width: 760px) {
  .t3-bday .bd-tb { min-width: 460px; }
}

.t3-bday .bd-bar-wrap { margin-top: 16px; }
.t3-bday .bd-bar-wrap h4 { margin: 0 0 8px; font-size: 13px; color: var(--sub); font-weight: 700; }
.t3-bday #bdBar { width: 100%; height: 34px; display: block; border-radius: 8px; }
.t3-bday .bd-barlegend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--sub); }
.t3-bday .bd-barlegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 4px; }

.t3-bday .bd-concl { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.t3-bday .bd-concl p { margin: 0; font-size: 14px; flex: 1; }
.t3-bday .bd-stamp {
  flex: 0 0 auto; border: 2.5px solid var(--acc); color: var(--acc); border-radius: 10px; padding: 6px 12px;
  font-size: 15px; font-weight: 800; letter-spacing: 2px; transform: rotate(-6deg); opacity: .9; text-align: center;
}
.t3-bday .bd-stamp small { display: block; font-size: 10.5px; letter-spacing: 0; font-weight: 400; }

.t3-bday .bd-steps { margin: 0; padding-left: 20px; font-size: 13px; color: var(--sub); }
.t3-bday .bd-steps li { margin-bottom: 6px; }
.t3-bday .bd-steps b { color: var(--ink); }
.t3-bday .bd-steps code { background: var(--soft); border-radius: 6px; padding: 1px 6px; color: var(--ink); font-family: Consolas, monospace; font-size: 12.5px; }

.t3-bday .bd-ops { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 22px 0; border-top: 1px solid var(--line); margin-top: 12px; }
.t3-bday .bd-ops button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px;
  padding: 8px 16px; font-size: 13px; cursor: pointer; font-family: inherit; transition: .15s;
}
.t3-bday .bd-ops button:hover { border-color: var(--acc); color: var(--acc); transform: translateY(-1px); }

/* ---------- 空态引导 ---------- */
.t3-bday .bd-empty {
  display: none; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: var(--card); border: 1px dashed var(--line); border-radius: 16px; padding: 36px 24px;
  color: var(--sub); box-shadow: var(--shadow);
}
.t3-bday .bd-empty-ico { font-size: 34px; line-height: 1; }
.t3-bday .bd-empty b { color: var(--ink); font-size: 15px; }
.t3-bday .bd-empty p { margin: 0; font-size: 13px; max-width: 380px; }
.t3-bday #bdOut[hidden] ~ .bd-empty { display: flex; }

/* ---------- history ---------- */
.t3-bday .bd-histcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); }
.t3-bday .bd-hist-head { display: flex; justify-content: space-between; align-items: center; }
.t3-bday .bd-hist-head h3 { margin: 0; font-size: 14px; font-weight: 700; }
.t3-bday .bd-hist-head button { border: 1px solid var(--line); background: none; color: var(--sub); border-radius: 8px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.t3-bday .bd-hist-head button:hover { color: var(--bad); border-color: var(--bad); }
.t3-bday .bd-hist { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.t3-bday .bd-hist-empty { margin: 0; font-size: 12.5px; color: var(--sub); }
.t3-bday .bd-hitem {
  display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 13px; background: var(--bg); transition: .15s;
}
.t3-bday .bd-hitem:hover { border-color: var(--acc); transform: translateY(-1px); }
.t3-bday .bd-hitem small { color: var(--sub); font-size: 11.5px; }

@media print {
  .t3-bday .bd-form, .t3-bday .bd-histcard, .t3-bday .bd-ops, .t3-bday .bd-hero, .t3-bday .bd-empty { display: none !important; }
  .t3-bday { background: #fff; padding: 0; }
  .t3-bday .bd-grid { display: block; }
  .t3-bday .bd-report { box-shadow: none; border-color: #be123c; }
}
