/* BNI 邀請來賓神器 — 共用樣式
   色版依據:BNI 官方簡報版型「2026 ACCELERATE」theme 色彩規範
   主紅 #CF2030 / 深灰 #64666A / 銀灰 #C8C8C8 / 淺灰 #E8E8E8・#F3F3F3 / 黑白
   字體:Arial(官方 major/minor font)+ 中文系統字型 */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #cf2030;        /* BNI Red(官方主色) */
  --red-dark: #a81a28;   /* 衍生色:僅供 hover 加深使用 */
  --ink: #000000;        /* 官方黑 */
  --gray: #64666a;       /* 官方深灰(次要文字) */
  --silver: #c8c8c8;     /* 官方銀灰(邊線) */
  --line: #e8e8e8;       /* 官方淺灰(分隔線) */
  --bg: #f3f3f3;         /* 官方淺灰(頁面底色) */
  --card: #ffffff;
  --red-tint: rgba(207, 32, 48, .06); /* 主紅 6% 淡色塊 */
  --radius: 12px;
}

body {
  font-family: Arial, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---- 頁首:白底 + 紅字標題 + 官方加速曲線(swoosh) ---- */
header.site {
  position: relative;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 30px 0 26px;
  overflow: hidden;
}
header.site .swoosh {
  position: absolute; right: 0; bottom: 0;
  height: 78%; max-width: 40%;
  object-fit: contain; object-position: right bottom;
  opacity: .9; pointer-events: none;
}
header.site .container { position: relative; }
header.site h1 { font-size: 1.6rem; letter-spacing: 1px; color: var(--red); font-style: italic; }
header.site p { color: var(--gray); font-size: .9rem; margin-top: 4px; }
.member-box { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .9rem; flex-wrap: wrap; }
.member-box span { white-space: nowrap; }
.member-box input[type="text"], .member-box select {
  padding: 6px 10px; border: 1px solid var(--silver); border-radius: 8px;
  font-size: .9rem; width: 180px; background: var(--card);
}
.member-box select { width: auto; max-width: 220px; }

/* ---- 分頁 ---- */
nav.tabs { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
nav.tabs button {
  padding: 10px 18px; border: 1px solid var(--silver); border-radius: 999px;
  background: var(--card); font-size: .95rem; cursor: pointer; color: var(--ink);
  font-family: inherit;
}
nav.tabs button.active { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }

.panel { display: none; }
.panel.active { display: block; }

/* ---- 卡片與表單 ---- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 20px;
}
.card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.card .hint { color: var(--gray); font-size: .88rem; margin-bottom: 16px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: 4px; }
input[type="text"], input[type="date"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--silver); border-radius: 8px;
  font-size: .95rem; font-family: inherit; background: #fff;
}
textarea { resize: vertical; min-height: 72px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); border-color: transparent; }

.btn {
  display: inline-block; padding: 11px 24px; border: none; border-radius: 8px;
  background: var(--red); color: #fff; font-size: 1rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--red-dark); }
.btn:disabled { background: var(--silver); cursor: wait; }
.btn.ghost { background: #fff; color: var(--red); border: 1px solid var(--red); }
.btn.sm { padding: 6px 14px; font-size: .85rem; font-weight: 400; }

/* ---- 生成結果 ---- */
.result-block { margin-top: 16px; }
.msg-card {
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden;
}
.msg-card .msg-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: var(--red-tint); font-weight: 700; font-size: .92rem;
}
.msg-card pre {
  padding: 16px; white-space: pre-wrap; word-break: break-word;
  font-family: inherit; font-size: .95rem;
}
.tips {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; font-size: .9rem;
}
.tips strong { color: var(--red); }
.tips li { margin-left: 1.2em; }
.engine-tag { font-size: .78rem; color: var(--gray); margin-bottom: 10px; }

/* ---- 腦力激盪結果 ---- */
.gap-card { border-left: 4px solid var(--red); background: var(--card); border-radius: 8px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 18px; margin-bottom: 12px; }
.gap-card h3 { font-size: 1.02rem; }
.gap-card .why { color: var(--gray); font-size: .88rem; margin-bottom: 6px; }
.gap-card li { margin-left: 1.2em; font-size: .92rem; }

/* ---- 場次列表 ---- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--gray); font-weight: 700; font-size: .85rem; }
.link-cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.link-cell a { color: var(--red); }
.table-wrap { overflow-x: auto; }

/* ---- 邀請進度追蹤 ---- */
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 16px; }
.stat-chip {
  border: 1px solid var(--line); background: var(--bg); border-radius: 999px;
  padding: 4px 12px; font-size: .82rem; color: var(--gray); white-space: nowrap;
}
.stat-chip b { color: var(--ink); }
.stat-chip.rate { border-color: var(--red); color: var(--red); }
.stat-chip.rate b { color: var(--red); }

#prospectTable th, #prospectTable td:nth-child(1), #prospectTable td:nth-child(2) { white-space: nowrap; }

select.status-select {
  width: auto; padding: 5px 8px; font-size: .85rem; border-radius: 999px;
  border: 1px solid var(--silver); background: var(--card); font-weight: 700;
}
select.st-idea { color: var(--gray); }
select.st-invited { color: var(--ink); background: var(--bg); }
select.st-yes { color: var(--red); border-color: var(--red); }
select.st-attended { color: #fff; background: var(--red); border-color: var(--red); }
select.st-joined { color: #fff; background: var(--ink); border-color: var(--ink); }
select.st-declined { color: var(--silver); }

input.note-input {
  width: 100%; min-width: 140px; padding: 6px 8px; font-size: .85rem;
  border: 1px solid transparent; border-radius: 6px; background: transparent;
}
input.note-input:hover { border-color: var(--line); }
input.note-input:focus { background: var(--card); }

.error { color: var(--red-dark); font-size: .9rem; margin-top: 10px; }
.loading { color: var(--gray); font-size: .9rem; margin-top: 10px; }

footer { text-align: center; color: var(--gray); font-size: .82rem; padding: 30px 0; }

/* ================= 來賓邀請函頁(invite.html) ================= */
/* 白底 + 紅字 + swoosh,對齊官方版型的封面風格 */
.invite-hero {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 48px 20px 0;
}
.invite-hero .badge {
  display: inline-block; border: 1px solid var(--red); color: var(--red);
  border-radius: 999px; padding: 4px 16px; font-size: .82rem;
  letter-spacing: 2px; margin-bottom: 14px;
}
.invite-hero h1 { font-size: 1.9rem; margin-bottom: 8px; color: var(--red); font-style: italic; }
.invite-hero p { color: var(--gray); }
.invite-hero .swoosh {
  display: block; width: 200px;
  margin: 16px auto 0;
}
.invite-body { max-width: 640px; margin: 24px auto 0; padding: 0 20px 40px; }
.info-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.info-row .k { color: var(--gray); flex: 0 0 5em; }
.done-box { text-align: center; padding: 30px 10px; }
.done-box .big { font-size: 2.2rem; }
