/* 客户案例生成器 — 样式 */
:root {
  --bg: #0f1216;
  --bg-soft: #161b22;
  --panel: #1b212b;
  --panel-2: #212935;
  --line: #2b3441;
  --text: #e7edf3;
  --muted: #93a1b1;
  --brand: #4f8cff;
  --brand-2: #6aa6ff;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, #1c2735 0%, var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* 顶栏 */
.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(15, 18, 22, 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { font-size: 30px; line-height: 1; }
.brand h1 { font-size: 19px; margin: 0; letter-spacing: .3px; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.topbar-actions { display: flex; gap: 8px; }

/* 布局 */
.layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
  padding-top: 22px;
  padding-bottom: 40px;
  align-items: start;
}
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.out-panel { position: sticky; top: 78px; }
@media (max-width: 880px) { .out-panel { position: static; } }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-head h2 { font-size: 15px; margin: 0; }
.muted { color: var(--muted); font-size: 12px; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .field-hint { color: var(--muted); font-size: 11.5px; margin: 4px 0 0; }
.field input, .field textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}
.field textarea { min-height: 84px; line-height: 1.55; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 140, 255, .18); }

/* 提示 */
.tips { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 14px; }
.tips h3 { font-size: 13px; margin: 0 0 8px; color: var(--brand-2); }
.tips ul { margin: 0; padding-left: 18px; }
.tips li { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }

/* 按钮 */
.btn {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: .15s;
}
.btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--brand-2); }
.btn-warn { border-color: #5a4a1f; color: var(--warn); }

/* 就绪度 */
.ready { display: flex; align-items: center; gap: 8px; }
.ready-label { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.ready-score { font-weight: 700; font-size: 14px; }
.ready.lv-ok .ready-label { color: var(--good); border-color: #1f5a44; }
.ready.lv-mid .ready-label { color: var(--warn); border-color: #5a4a1f; }
.ready.lv-low .ready-label { color: var(--bad); border-color: #5a2a2a; }
.ready-bar { height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.ready-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--good)); transition: width .35s; }
.ready-checks { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 14px; padding: 0; }
.ready-checks li { font-size: 11.5px; color: var(--muted); }
.ready-checks li.ok::before { content: "✓ "; color: var(--good); }
.ready-checks li.no::before { content: "○ "; color: var(--bad); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  background: transparent; border: none; color: var(--muted);
  padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }
.badge { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.badge.alert { background: #5a2a2a; color: var(--bad); border-color: #5a2a2a; }

.tab-body { min-height: 240px; }
.tabpane { display: none; }
.tabpane.active { display: block; animation: fade .2s; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 案例结构 */
.cs-title { font-size: 17px; margin: 0 0 6px; line-height: 1.4; }
.cs-meta { color: var(--muted); font-size: 12px; margin: 0 0 14px; }
.cs-sec { margin-bottom: 14px; }
.cs-sec h4 { font-size: 13.5px; margin: 0 0 5px; color: var(--brand-2); }
.cs-sec p { margin: 0 0 6px; }
.cs-sec ul { margin: 0; padding-left: 18px; }
.cs-sec li { margin-bottom: 3px; }
.empty-hint { color: var(--muted); font-style: italic; }

/* 亮点 */
.hl { display: flex; gap: 10px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; }
.hl .num { color: var(--brand); font-weight: 700; }

/* 文案块 */
.copyblock { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-bottom: 12px; position: relative; }
.copyblock h4 { margin: 0 0 8px; font-size: 13px; color: var(--brand-2); }
.copyblock pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 13.5px; line-height: 1.6; }
.copyblock .mini-copy { position: absolute; top: 10px; right: 10px; font-size: 11px; padding: 4px 9px; }

/* 脱敏 */
.sens-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 11px; background: var(--bg-soft); border: 1px solid #5a2a2a; border-radius: 9px; margin-bottom: 8px; }
.sens-type { font-size: 11px; color: var(--warn); border: 1px solid #5a4a1f; border-radius: 999px; padding: 1px 8px; }
.sens-field { font-size: 11px; color: var(--muted); }
.sens-match { font-weight: 600; color: var(--bad); }
.sens-arrow { color: var(--muted); }
.sens-fix { color: var(--good); }
.sens-clean { text-align: center; padding: 28px 10px; color: var(--good); }
.sens-clean .big { font-size: 30px; display: block; margin-bottom: 6px; }

/* 输出操作 */
.out-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.privacy { color: var(--muted); font-size: 11.5px; margin: 12px 0 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 12.5px; }
.foot a { color: var(--brand-2); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: #0b0e12; border: 1px solid var(--brand); color: var(--text);
  padding: 10px 18px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: .25s; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
