/* SignalForge 可点击测试站 · t207 运营逻辑预览 · 无活 API、无真实扣款 */
:root {
  --navy: #0B1F33;
  --navy-2: #07151F;
  --ink: #0B1F33;
  --teal: #2F6F8F;
  --paper: #F3EFE8;
  --paper-2: #E7E2D8;
  --ivory: #F7F4EE;
  --white: #FFFCF7;
  --muted: #5A6570;
  --muted-on-dark: #C5D0D8;
  --line: #D5D0C6;
  --line-dark: rgba(247, 244, 238, 0.12);
  --gold: #C5A572;
  --gold-ink: #8A6A3B;
  --danger: #8F2D2D;
  --ok: #2C6A4A;
  --serif-cn: "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --serif-en: "Instrument Serif", "Newsreader", "Source Serif Pro", serif;
  --sans-cn: "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sans-en: "Instrument Sans", "Source Sans 3", "Inter", sans-serif;
  --sidebar: 228px;
  --top: 56px;
  --rail: 36px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--paper); }
body {
  color: var(--ink);
  font-family: var(--sans-en), var(--sans-cn);
  font-size: 14px;
  line-height: 1.55;
}
a { color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }

.preview-rail {
  position: sticky; top: 0; z-index: 10000;
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  padding: 8px 18px; min-height: var(--rail);
  background: var(--navy-2); color: var(--paper);
  font: 12px/1.4 var(--sans-cn);
  border-bottom: 1px solid rgba(197,165,114,.35);
}
.preview-rail b { font-weight: 600; color: var(--gold); margin-right: 6px; }
.preview-rail a { color: #E7E2D8; text-decoration: none; border-bottom: 1px solid rgba(231,226,216,.35); }
.preview-rail a:hover { color: #fff; }
.preview-rail .muted { opacity: .75; flex: 1 1 240px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: 2px;
  border: 1px solid transparent; text-decoration: none; cursor: pointer;
  background: none; color: var(--ink); font-weight: 550; letter-spacing: .01em;
  white-space: nowrap;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn--lg { height: 44px; padding: 0 22px; font-size: 14.5px; }
.btn--block { width: 100%; }
.btn--navy { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.btn--navy:hover { background: #123049; }
.btn--gold { background: var(--gold); color: var(--navy-2); border-color: var(--gold); }
.btn--ghost { border-color: var(--line); background: transparent; }
.btn--ghost-light { border-color: rgba(247,244,238,.35); color: var(--ivory); }
.btn--solid-light { background: var(--ivory); color: var(--navy); border-color: var(--ivory); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--danger { border-color: var(--danger); color: var(--danger); }
.btn--link { height: auto; padding: 0; border: 0; color: var(--teal); text-decoration: underline; background: none; cursor: pointer; }

.topbar {
  height: var(--top);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: var(--navy-2);
  color: var(--ivory);
  border-bottom: 1px solid var(--line-dark);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ivory); }
.brand__mark { width: 10px; height: 10px; background: var(--gold); display: inline-block; }
.brand__name { font-family: var(--serif-en); font-size: 18px; letter-spacing: .02em; }
.topbar__meta { margin-left: auto; display: flex; align-items: center; gap: 12px; font-family: var(--sans-cn); font-size: 12.5px; color: var(--muted-on-dark); }
.topbar__meta strong { color: var(--gold); font-weight: 600; }
.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 11px; font-size: 11px; letter-spacing: .02em;
  border: 1px solid var(--line); color: var(--muted); background: var(--white);
  font-family: var(--sans-cn);
}
.chip--gold { border-color: var(--gold); color: var(--gold-ink); background: #F6EFE3; }
.chip--ok { border-color: #9EC9B3; color: var(--ok); background: #E8F4EE; }
.chip--warn { border-color: #D8C48A; color: var(--gold-ink); background: #F8F1DE; }
.chip--none { border-color: var(--line); color: var(--muted); }
.chip--on-dark { border-color: rgba(197,165,114,.45); color: var(--gold); background: transparent; }

.shell { display: flex; min-height: calc(100vh - var(--rail) - var(--top)); }
.sidenav {
  width: var(--sidebar); flex: 0 0 var(--sidebar);
  background: var(--ivory);
  border-right: 1px solid var(--line);
  padding: 18px 0 80px;
}
.sidenav__label {
  padding: 6px 20px 10px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-family: var(--sans-en);
}
.navitem {
  display: block;
  padding: 9px 20px 9px 18px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--sans-cn);
  font-size: 13.5px;
}
.navitem:hover { color: var(--navy); background: rgba(11,31,51,.03); }
.navitem.is-active {
  color: var(--navy);
  border-left-color: var(--gold);
  background: rgba(197,165,114,.12);
  font-weight: 600;
}
.navitem small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; }
.main { flex: 1; min-width: 0; padding: 28px 32px 96px; background: var(--paper); }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.kicker { color: var(--gold-ink); font-size: 12px; letter-spacing: .08em; font-family: var(--sans-cn); margin-bottom: 6px; }
h1, h2, h3 { font-weight: 600; }
h1 { font-family: var(--serif-cn); font-size: 28px; line-height: 1.25; letter-spacing: .01em; }
h2 { font-family: var(--serif-cn); font-size: 20px; }
h3 { font-size: 15px; }
.lead { color: var(--muted); max-width: 640px; margin-top: 6px; }

.banner {
  padding: 12px 16px; margin-bottom: 18px;
  border: 1px solid rgba(197,165,114,.45);
  background: #F6EFE3;
  font-family: var(--sans-cn); font-size: 13px;
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.banner--info { background: #EEF3F6; border-color: #C9D6DE; }

.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidenav { width: 100%; flex-basis: auto; display: flex; flex-wrap: wrap; padding: 8px 8px 4px; }
  .sidenav__label { width: 100%; }
  .navitem { border-left: 0; border-bottom: 2px solid transparent; padding: 8px 12px; }
  .navitem.is-active { border-bottom-color: var(--gold); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 96px; }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px 18px;
}
.card h3 { margin-bottom: 6px; }
.card .meta, .muted { color: var(--muted); }
.stat { font-family: var(--serif-en); font-size: 28px; color: var(--navy); }
.card a.stretched { text-decoration: none; color: inherit; display: block; }
.card:hover.interactive { border-color: var(--gold); }

.table-wrap { overflow: auto; background: var(--white); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-family: var(--sans-cn); font-size: 13px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--ivory); color: var(--muted); font-size: 12px; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #F7F4EE; }

.field { display: flex; flex-direction: column; gap: 5px; font-family: var(--sans-cn); margin-bottom: 12px; }
.field span { font-size: 12.5px; color: var(--muted); }
.field input, .field select, .field textarea {
  height: 38px; padding: 0 10px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  border-radius: 2px;
}
.field textarea { height: 110px; padding: 8px 10px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-card { max-width: 640px; background: var(--white); border: 1px solid var(--line); padding: 24px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 14px; }
.error { color: var(--danger); font-size: 13px; margin: 0 0 10px; font-family: var(--sans-cn); }
.empty {
  padding: 36px 20px; text-align: center; color: var(--muted);
  background: var(--white); border: 1px dashed var(--line);
  font-family: var(--sans-cn);
}

.auth {
  min-height: calc(100vh - var(--rail));
  display: grid; place-items: start center;
  padding: 48px 16px 80px;
  background: var(--navy-2);
  color: var(--ivory);
}
.auth__card {
  width: 100%; max-width: 440px;
  background: var(--ivory); color: var(--ink);
  border: 1px solid var(--line); padding: 32px 28px;
}
.auth h1 { font-size: 24px; margin: 4px 0 8px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 820px; width: 100%; }
.role-card {
  background: var(--ivory); color: var(--ink);
  border: 1px solid var(--line); padding: 28px 24px;
  text-decoration: none; display: block;
}
.role-card:hover { border-color: var(--gold); }
.role-card p { color: var(--muted); margin-top: 8px; }

.detail { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; }
@media (max-width: 900px) { .detail, .row, .role-pick { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-family: var(--sans-cn); font-size: 13.5px; }
.kv dt { color: var(--muted); }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.bubble { padding: 10px 12px; border: 1px solid var(--line); background: var(--white); max-width: 80%; font-family: var(--sans-cn); }
.bubble--me { margin-left: auto; background: #EEF3F6; border-color: #C9D6DE; }
.bubble .who { font-size: 11px; color: var(--muted); margin-bottom: 4px; }

.pay { max-width: 560px; }
.pay-box { background: var(--white); border: 1px solid var(--line); padding: 24px; }
.pay-note {
  margin: 0 0 16px; padding: 10px 12px;
  background: #F6EFE3; border: 1px solid rgba(197,165,114,.45);
  font-size: 13px; font-family: var(--sans-cn);
}

.toast-wrap {
  position: fixed; right: 20px; bottom: 20px; z-index: 9000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--navy); color: var(--ivory);
  padding: 10px 14px; font-size: 13px; min-width: 220px;
  box-shadow: 0 8px 24px rgba(7,21,31,.2);
}

/* Independent AI chat window */
.ai-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 8000;
  height: 48px; padding: 0 18px;
  background: var(--navy); color: var(--ivory);
  border: 1px solid var(--gold); border-radius: 24px;
  cursor: pointer; font-family: var(--sans-cn); font-weight: 600;
}
.ai-win {
  position: fixed; right: 22px; bottom: 80px; z-index: 8000;
  width: 360px; height: 520px; max-height: calc(100vh - 140px);
  background: var(--white); border: 1px solid var(--navy);
  display: flex; flex-direction: column;
  box-shadow: 0 16px 40px rgba(7,21,31,.22);
}
.ai-win__bar {
  height: 46px; padding: 0 12px;
  background: var(--navy-2); color: var(--ivory);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--sans-cn); font-size: 13px;
}
.ai-win__bar b { color: var(--gold); font-weight: 600; margin-right: 6px; }
.ai-win__body { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.ai-msg { padding: 8px 10px; border: 1px solid var(--line); background: var(--white); font-size: 13px; font-family: var(--sans-cn); }
.ai-msg--user { margin-left: 32px; background: #EEF3F6; }
.ai-msg--bot { margin-right: 16px; }
.ai-win__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--ivory); }
.ai-win__form input { flex: 1; height: 36px; border: 1px solid var(--line); padding: 0 10px; }
.ai-match { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; }

.wm {
  pointer-events: none; position: fixed; right: 28px; top: 96px;
  font-family: var(--serif-en); font-size: 14px; letter-spacing: .12em;
  color: rgba(11,31,51,.18); z-index: 1;
}

.plan { border: 1px solid var(--line); padding: 18px; background: var(--white); }
.plan.is-featured { border-color: var(--navy); box-shadow: inset 0 3px 0 var(--gold); }
.plan .price { font-family: var(--serif-en); font-size: 28px; margin: 6px 0; }
.plan ul { margin: 8px 0 14px 18px; color: var(--muted); }

.top-link { color: var(--muted-on-dark); text-decoration: none; font-size: 13px; }
.top-link:hover { color: var(--ivory); }
.rail-btn {
  background: none; border: 0; color: #E7E2D8; cursor: pointer;
  font: inherit; text-decoration: none; border-bottom: 1px solid rgba(231,226,216,.35); padding: 0;
}
.rail-btn:hover { color: #fff; }

.cat-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.nav-badge {
  display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--gold); color: var(--navy-2);
  font-size: 11px; font-weight: 700; margin-left: 6px;
  align-items: center; justify-content: center; vertical-align: middle;
}
.plaza-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.plaza-col__head {
  font-family: var(--serif-cn);
  font-size: 16px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
}
.pcard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pcard {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  margin-bottom: 14px;
  overflow: hidden;
}
.pcard-grid .pcard { margin-bottom: 0; }
.pcard:hover { border-color: var(--gold); }
.pcard__img {
  background: var(--paper-2);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
}
.pcard__img img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { padding: 12px 14px 14px; }
.pcard__body h3 { font-size: 15px; margin: 0 0 8px; line-height: 1.35; }
.pcard__meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.img-fallback {
  display: grid; place-items: center;
  width: 100%; height: 100%; min-height: 160px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-family: var(--sans-cn);
}
.gallery { margin-bottom: 8px; }
.gallery__main {
  background: var(--paper-2);
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.gallery__main img { width: 100%; max-height: 520px; object-fit: contain; background: var(--paper); }
.gallery__thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.gallery__thumb {
  width: 64px; height: 64px; padding: 0; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; overflow: hidden;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumb.is-on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.photo-drafts { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.photo-draft { width: 110px; }
.photo-draft img, .photo-draft .img-fallback { width: 110px; height: 110px; object-fit: cover; border: 1px solid var(--line); }
.need-thumb { display: inline-block; width: 36px; height: 36px; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.need-thumb img, .need-thumb .img-fallback { width: 36px; height: 36px; object-fit: cover; }
.need-ref { margin-bottom: 12px; max-width: 240px; }
.need-ref img { border: 1px solid var(--line); }
.email-line { font-size: 16px; font-weight: 600; margin: 8px 0; word-break: break-all; }
.ok-line { margin-top: 12px; color: var(--ok); }

.msg-list { display: flex; flex-direction: column; gap: 8px; }
.msg-item {
  display: block; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--line); padding: 12px 14px;
}
.msg-item:hover, .msg-item.is-on { border-color: var(--gold); }
.msg-item.is-unread { box-shadow: inset 3px 0 0 var(--gold); }
.msg-item h3 { margin-bottom: 4px; }
.msg-preview { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.in-thread-email { margin: 12px 0; padding: 10px 12px; background: var(--ivory); border: 1px solid var(--line); font-size: 13px; }
.bubble--quote { max-width: 100%; background: var(--ivory); border-left: 3px solid var(--gold); }
.bubble--system {
  align-self: center; background: transparent; border-style: dashed;
  color: var(--muted); font-size: 12px; max-width: 100%; text-align: center;
}
.quote-card { display: grid; gap: 4px; }
.quote-label { font-size: 11px; color: var(--gold-ink); letter-spacing: .06em; margin-bottom: 6px; }
.quote-row { display: grid; grid-template-columns: 120px 1fr; gap: 6px; font-size: 13px; }
.quote-row span { color: var(--muted); }

.modal {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(7,21,31,.55);
  display: grid; place-items: center; padding: 24px;
}
.modal__card {
  width: 100%; max-width: 440px;
  background: var(--ivory); color: var(--ink);
  border: 1px solid var(--line); padding: 28px 24px;
  max-height: calc(100vh - 48px); overflow: auto;
}
.modal__card--wide { max-width: 520px; }
.modal__card h2 { margin: 4px 0 10px; }
.modal__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.empty--sm { padding: 16px 10px; font-size: 12.5px; }
.main--public { padding-top: 28px; }

.ai-fab--aside { right: auto; left: 22px; bottom: 22px; }
.ai-win--aside {
  right: auto; left: 22px;
  top: 100px; bottom: auto;
  height: 360px; max-height: calc(100vh - 160px);
}

@media (max-width: 1100px) {
  .plaza-cols, .pcard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .plaza-cols, .pcard-grid { grid-template-columns: 1fr; }
  .ai-win--aside, .ai-fab--aside { left: 12px; right: auto; }
}
