/* =====================================================================
   风筝表单 KiteForm · 设计系统
   风格：简约商务 + 稳重科技感 (B2B SaaS)
   ===================================================================== */

:root {
  --brand: #1d4ed8;
  --brand-600: #2563eb;
  --brand-50: #eff4ff;
  --brand-100: #dbe6fe;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e6eaf0;
  --line-2: #eef1f6;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-soft-2: #f1f5f9;
  --success: #0f9960;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-2: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-3: 0 12px 40px rgba(15, 23, 42, .12);
  /* 稳重可靠的中文字体栈：优先方正/思源/鸿蒙等黑体，字形方正、重心稳定 */
  --font: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans SC", "Source Han Sans CN",
          "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont,
          "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, "PingFang SC", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: .012em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: 1.4; letter-spacing: -.005em; }
button, input, select, textarea { font-family: inherit; letter-spacing: inherit; }
.mono, .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: 0; }
table, .table { font-variant-numeric: tabular-nums; }
p { margin: 0 0 12px; }
ul { margin: 0; padding: 0; list-style: none; }
code, pre { font-family: "JetBrains Mono", Menlo, Consolas, monospace; }
.kf-icon { vertical-align: -3px; flex: none; }
::selection { background: var(--brand-100); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px; }
.text-muted { color: var(--muted); }
.text-brand { color: var(--brand); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.mt-8 { margin-top: 8px } .mt-16 { margin-top: 16px } .mt-24 { margin-top: 24px } .mt-32 { margin-top: 32px }
.mb-8 { margin-bottom: 8px } .mb-16 { margin-bottom: 16px } .mb-24 { margin-bottom: 24px }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.spacer { flex: 1; }
.hide { display: none !important; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid transparent; cursor: pointer; background: transparent; color: var(--ink);
  transition: all .16s ease; white-space: nowrap; font-family: inherit;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(29, 78, 216, .25); }
.btn-primary:hover { background: #1a44be; }
.btn-outline { border-color: var(--line); background: #fff; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 6px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------------- 表单控件 ---------------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, .select, textarea.textarea {
  width: 100%; height: 38px; padding: 0 12px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea.textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, textarea.textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input::placeholder { color: var(--muted-2); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 38px; height: 22px; border-radius: 11px; background: #cbd5e1; position: relative; transition: background .18s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(16px); }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check-line input { width: 16px; height: 16px; accent-color: var(--brand); }
.color-input { width: 46px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }

/* ---------------- 卡片 / 表格 ---------------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.card-pad { padding: 22px; }
.card-head { padding: 16px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h3 { font-size: 15px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; letter-spacing: .02em; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: var(--bg-soft); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fafcff; }
.table .nowrap { white-space: nowrap; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 12px; font-weight: 600; background: var(--bg-soft-2); color: var(--muted); }
.badge-success { background: #e7f7ef; color: var(--success); }
.badge-warning { background: #fef4e6; color: var(--warning); }
.badge-danger { background: #fdecec; color: var(--danger); }
.badge-brand { background: var(--brand-50); color: var(--brand); }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-success { background: #effaf4; border-color: #b7e7cd; color: #0b6b45; }
.alert-info { background: var(--brand-50); border-color: var(--brand-100); color: #1e40af; }

.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty svg { opacity: .35; margin-bottom: 12px; }
.empty h4 { font-size: 15px; color: var(--ink-2); margin-bottom: 6px; }

/* ---------------- 官网头部 / 底部 ---------------- */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .inner { height: 62px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.logo .mark { width: 28px; height: 28px; border-radius: 7px; background: linear-gradient(135deg, var(--brand-600), #0ea5e9); display: grid; place-items: center; color: #fff; }
.logo .mark svg { width: 17px; height: 17px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 7px 12px; border-radius: 7px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--bg-soft); }
.nav a.active { color: var(--brand); background: var(--brand-50); }
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 40px 0 30px; background: var(--bg-soft); color: var(--muted); font-size: 13.5px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h5 { font-size: 13px; color: var(--ink); margin-bottom: 12px; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: var(--brand); }
.site-footer .bottom { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------------- 首页 Hero ---------------- */
.hero { padding: 76px 0 56px; background: radial-gradient(1000px 420px at 50% -80px, #eaf1ff 0%, #ffffff 70%); border-bottom: 1px solid var(--line-2); }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 20px; background: #fff; border: 1px solid var(--brand-100); color: var(--brand); font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: 46px; line-height: 1.2; letter-spacing: -.03em; max-width: 720px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: 17px; color: var(--muted); max-width: 640px; margin: 18px 0 28px; line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-metrics { display: flex; gap: 44px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.hero-metrics .m b { display: block; font-size: 26px; letter-spacing: -.02em; }
.hero-metrics .m span { font-size: 13px; color: var(--muted); }

.hero-preview { margin-top: 46px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3); overflow: hidden; background: #fff; }
.hero-preview .bar { height: 38px; background: var(--bg-soft); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 14px; gap: 8px; }
.hero-preview .bar i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; display: block; }
.hero-preview .body { display: grid; grid-template-columns: 200px 1fr 220px; min-height: 330px; }
.hero-preview .col { padding: 16px; border-right: 1px solid var(--line-2); }
.hero-preview .col:last-child { border-right: 0; }
.hero-preview .sk { height: 10px; border-radius: 5px; background: var(--line-2); margin-bottom: 10px; }
.hero-preview .sk.w60 { width: 60% } .hero-preview .sk.w80 { width: 80% } .hero-preview .sk.w40 { width: 40% }
.hero-preview .fbox { height: 46px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; background: #fff; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 68px 0; }
.section-head { max-width: 700px; margin-bottom: 36px; }
.section-head .kicker { font-size: 13px; font-weight: 700; color: var(--brand); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.section-head h2 { font-size: 32px; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: box-shadow .2s, transform .2s; }
.feature:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.feature .ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.feature h4 { font-size: 16px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; margin: 0; }

.band { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.step .no { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.step h4 { font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* 价格 */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.price-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; background: #fff; }
.price-card.hot { border-color: var(--brand); box-shadow: 0 8px 30px rgba(29,78,216,.12); position: relative; }
.price-card.hot .tag { position: absolute; top: -11px; left: 28px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.price-card h4 { font-size: 17px; }
.price-card .desc { color: var(--muted); font-size: 13.5px; margin: 6px 0 16px; }
.price-card .price { font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.price-card .price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.price-card ul { margin: 18px 0 22px; }
.price-card li { display: flex; gap: 8px; font-size: 14px; padding: 5px 0; color: var(--ink-2); }
.price-card li svg { color: var(--brand); }

/* 模板 */
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tpl { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; transition: box-shadow .2s, transform .2s; }
.tpl:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.tpl .thumb { height: 118px; background: linear-gradient(135deg, #eef2ff, #f8fafc); display: grid; place-items: center; color: var(--brand); border-bottom: 1px solid var(--line-2); }
.tpl .meta { padding: 14px; }
.tpl .meta h5 { font-size: 14.5px; margin-bottom: 4px; }
.tpl .meta p { font-size: 12.5px; color: var(--muted); margin: 0; }

/* ---------------- 登录 / 注册 ---------------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: linear-gradient(160deg, #0f172a 0%, #16306b 55%, #1d4ed8 100%); color: #fff; padding: 56px 52px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; right: -120px; bottom: -140px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255,255,255,.06); }
.auth-side h2 { font-size: 30px; letter-spacing: -.02em; margin-bottom: 14px; }
.auth-side p { color: rgba(255,255,255,.72); max-width: 380px; }
.auth-side .points { margin-top: 26px; }
.auth-side .points li { display: flex; gap: 10px; padding: 8px 0; color: rgba(255,255,255,.85); font-size: 14.5px; }
.auth-side .points svg { color: #7dd3fc; margin-top: 3px; }
.auth-side .logo { color: #fff; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-size: 26px; margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin-bottom: 26px; font-size: 14px; }
.auth-box .links { display: flex; justify-content: space-between; font-size: 13.5px; margin-top: 14px; }
.auth-box .links a { color: var(--brand); }
.divider-text { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12px; margin: 18px 0; }
.divider-text::before, .divider-text::after { content: ''; height: 1px; background: var(--line); flex: 1; }

/* ---------------- 控制台 ---------------- */
.dash { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; background: var(--bg-soft); }
.dash-side { background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.dash-side .logo { padding: 8px 10px 18px; }
.dash-side .menu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2); margin-bottom: 2px; font-weight: 500; }
.dash-side .menu a:hover { background: var(--bg-soft); }
.dash-side .menu a.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.dash-side .menu .grp { font-size: 11.5px; color: var(--muted-2); padding: 16px 12px 6px; letter-spacing: .04em; }
.dash-side .side-foot { margin: 16px 8px 8px; }
.dash-side .menu .m-dot { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.dash-main { padding: 0 0 60px; min-width: 0; }
.dash-top { height: 62px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 26px; gap: 12px; position: sticky; top: 0; z-index: 60; }

/* ---------------- 右上角用户菜单 ---------------- */
.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 10px 0 5px; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; color: var(--ink); font-family: inherit; }
.user-trigger:hover, .user-menu.open .user-trigger { background: var(--bg-soft); border-color: var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-600), #0ea5e9); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; flex: none; object-fit: cover; letter-spacing: 0; }
.avatar.lg { width: 46px; height: 46px; font-size: 18px; }
.user-trigger .u-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.user-trigger .u-meta b { font-size: 13.5px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.vip.vip-on { color: #b45309; }
.user-trigger .caret { color: var(--muted-2); display: grid; place-items: center; transition: transform .18s; }
.user-menu.open .user-trigger .caret { transform: rotate(180deg); }

.user-pop { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); z-index: 80; overflow: hidden; }
.user-menu:hover .user-pop, .user-menu.open .user-pop { display: block; animation: popIn .16s ease; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }
.user-pop .pop-head { display: flex; gap: 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line-2); }
.user-pop .ph-info { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.user-pop .ph-info b { font-size: 15px; font-weight: 600; }
.user-pop .ph-info .small { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-pop .pop-quota { padding: 14px 16px; border-bottom: 1px solid var(--line-2); background: var(--bg-soft); }
.user-pop .q-row + .q-row { margin-top: 10px; }
.user-pop .bar { height: 6px; border-radius: 3px; background: #e2e8f0; margin-top: 5px; overflow: hidden; }
.user-pop .bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.user-pop .pop-links { padding: 6px; }
.user-pop .pop-links a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.user-pop .pop-links a:hover { background: var(--brand-50); color: var(--brand); }
.user-pop .pop-links .m-dot { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.user-pop .pop-foot { border-top: 1px solid var(--line-2); padding: 6px; }
.user-pop .pop-foot a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px; font-size: 14px; color: var(--danger); font-weight: 500; }
.user-pop .pop-foot a:hover { background: #fef2f2; }
.dash-body { padding: 26px; overflow-x: clip; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title h2 { font-size: 21px; }
.page-title .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.stat .lab { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .val { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.stat .cmp { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.form-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; transition: box-shadow .18s, transform .18s; position: relative; }
.form-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.form-card .t { display: flex; align-items: flex-start; gap: 10px; }
.form-card .t .ico { width: 36px; height: 36px; border-radius: 9px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.form-card h4 { font-size: 15px; line-height: 1.4; word-break: break-all; }
.form-card .meta { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.form-card .acts { display: flex; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }

/* ---------------- 编辑器 ---------------- */
.editor { display: flex; flex-direction: column; height: 100vh; background: var(--bg-soft); }
.editor-top { height: 54px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 16px; gap: 14px; z-index: 40; }
.editor-top .title-input { width: 260px; height: 34px; border: 1px solid transparent; border-radius: 7px; padding: 0 10px; font-size: 15px; font-weight: 600; background: transparent; }
.editor-top .title-input:hover { border-color: var(--line); }
.editor-top .title-input:focus { outline: none; border-color: var(--brand); background: #fff; }
.flow { display: flex; align-items: center; gap: 2px; background: var(--bg-soft); padding: 3px; border-radius: 9px; }
.flow button { height: 30px; padding: 0 14px; border: 0; background: transparent; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; }
.flow button.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-1); }
.editor-body { flex: 1; display: grid; grid-template-columns: 260px 1fr 320px; min-height: 0; }

.pane { background: #fff; overflow: auto; }
.pane-left { border-right: 1px solid var(--line); }
.pane-right { border-left: 1px solid var(--line); }
.pane-tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 5; }
.pane-tabs button { flex: 1; height: 42px; border: 0; background: transparent; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
.pane-tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.pane-sec { padding: 14px 14px 6px; }
.pane-sec h5 { font-size: 12px; color: var(--muted-2); letter-spacing: .05em; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lib-item { display: flex; align-items: center; gap: 7px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: grab; font-size: 13px; color: var(--ink-2); transition: all .15s; user-select: none; }
.lib-item:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.lib-item:active { cursor: grabbing; }
.lib-item svg { opacity: .8; }
.lib-list { display: flex; flex-direction: column; gap: 6px; }
.lib-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: grab; font-size: 13.5px; background: #fff; }
.lib-row:hover { border-color: var(--brand); color: var(--brand); }
.lib-row .tag { margin-left: auto; font-size: 11px; color: var(--muted-2); }

.canvas-wrap { padding: 26px 20px 60px; overflow: auto; background: var(--bg-soft); }
.canvas { width: 100%; max-width: 720px; margin: 0 auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow-2); overflow: hidden; min-height: 420px; transition: background .2s; }
.canvas.drop-active { outline: 2px dashed var(--brand); outline-offset: 4px; }
.canvas-head { padding: 22px 24px 14px; border-bottom: 1px solid var(--line-2); }
.canvas-head h2 { font-size: 22px; }
.canvas-head p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.canvas-media { width: 100%; background: var(--bg-soft-2); object-fit: cover; }
.canvas-fields { padding: 18px 24px 26px; display: flex; flex-direction: column; gap: 4px; }
.cf { position: relative; padding: 12px 14px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; transition: all .14s; }
.cf:hover { border-color: var(--brand-100); background: #fbfcff; }
.cf.selected { border-color: var(--brand); background: var(--brand-50); }
.cf .cf-label { font-size: 14.5px; font-weight: 600; margin-bottom: 7px; }
.cf .cf-label .req { color: var(--danger); margin-left: 3px; }
.cf .cf-input { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 12px; color: var(--muted-2); font-size: 14px; display: flex; align-items: center; }
.cf .cf-input.filled { background: var(--bg-soft); border-style: dashed; }
.cf .cf-input.underline { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.cf textarea.cf-input { height: auto; padding: 8px 12px; resize: none; }
.cf .cf-tools { position: absolute; right: 6px; top: 6px; display: none; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 2px; box-shadow: var(--shadow-1); }
.cf:hover .cf-tools, .cf.selected .cf-tools { display: flex; }
.cf .cf-tools button { width: 26px; height: 26px; border: 0; background: transparent; border-radius: 5px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.cf .cf-tools button:hover { background: var(--bg-soft); color: var(--ink); }
.cf .cf-tools .cf-handle { cursor: grab; letter-spacing: -2px; font-size: 13px; color: var(--muted-2); }
.cf .cf-tools .cf-handle:active { cursor: grabbing; }
.cf.dragging { opacity: .42; }
.cf.drop-before::before, .cf.drop-after::after {
  content: ''; position: absolute; left: 8px; right: 8px; height: 3px; border-radius: 2px;
  background: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}
.cf.drop-before::before { top: -4px; }
.cf.drop-after::after { bottom: -4px; }
.cf .cf-help { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.cf-choices { display: flex; flex-direction: column; gap: 6px; }
.cf-choices.h { flex-direction: row; flex-wrap: wrap; gap: 14px; }
.cf-choice { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); }
.cf-choice i { width: 16px; height: 16px; border: 1px solid var(--line); border-radius: 50%; display: block; background: #fff; }
.cf-choice.sq i { border-radius: 4px; }
.cf-drop { height: 14px; margin: -7px 0; border-radius: 4px; transition: height .12s, background .15s; }
.cf-drop.over { background: var(--brand); height: 4px; margin: -1px 0; }
.canvas-empty { padding: 70px 20px; text-align: center; color: var(--muted); border: 2px dashed var(--line); border-radius: 12px; margin: 20px; transition: border-color .15s, background .15s; }
.canvas-empty.over { border-color: var(--brand); background: var(--brand-50); color: var(--brand); }

.prop-group { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.prop-group h5 { font-size: 13px; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.prop-row { margin-bottom: 12px; }
.prop-row > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.prop-row .input, .prop-row .select { height: 34px; font-size: 13.5px; }
.opt-item { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.opt-item .input { height: 32px; }
.opt-item button { flex: none; }
.prop-empty { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 5px 11px; border: 1px solid var(--line); border-radius: 20px; font-size: 12.5px; cursor: pointer; background: #fff; }
.chip.active { background: var(--brand-50); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.active { box-shadow: 0 0 0 2px var(--brand); }

/* ---------------- 弹窗 / Toast ---------------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 200; padding: 20px; }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-3); width: 100%; max-width: 720px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-sm { max-width: 440px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 22px; overflow: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; background: var(--bg-soft); }
.create-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mode-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px; cursor: pointer; transition: all .16s; background: #fff; text-align: left; }
.mode-card:hover { border-color: var(--brand); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.mode-card .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: var(--brand-50); color: var(--brand); }
.mode-card h4 { font-size: 15.5px; margin-bottom: 6px; }
.mode-card p { font-size: 13px; color: var(--muted); margin: 0; }
.tpl-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-height: 380px; overflow: auto; padding: 2px; }
.tpl-pick .t { border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.tpl-pick .t.active { border-color: var(--brand); background: var(--brand-50); }
.tpl-pick .t h6 { font-size: 13.5px; margin: 0 0 4px; }
.tpl-pick .t p { font-size: 12px; color: var(--muted); margin: 0; }

.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; box-shadow: var(--shadow-3); animation: toastIn .2s ease; }
.toast.ok { background: #0f766e; } .toast.err { background: #b91c1c; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }

/* ---------------- 发布成功页 ---------------- */
.publish-wrap { max-width: 720px; margin: 0 auto; padding: 40px 24px 60px; }
.publish-hero { text-align: center; }
.publish-hero .ok-icon { width: 62px; height: 62px; border-radius: 50%; background: #e7f7ef; color: var(--success); display: grid; place-items: center; margin: 0 auto 18px; }
.publish-hero h2 { font-size: 24px; margin-bottom: 8px; }
.publish-hero p { color: var(--muted); }
.link-box { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.link-box .input { flex: 1 1 220px; min-width: 0; font-size: 13.5px; }
.link-box .btn { flex: 0 0 auto; white-space: nowrap; }
.pub-grid { display: grid; grid-template-columns: 190px 1fr; gap: 26px; align-items: start; }
.pub-grid > * { min-width: 0; }
.qr-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center; background: #fff; }
.qr-box img { width: 160px; height: 160px; margin: 0 auto 10px; }
.embed-code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 12.5px; color: var(--ink-2); overflow-x: auto; white-space: pre; word-break: break-all; max-width: 100%; }

/* 数据 */
.data-table-wrap { overflow: auto; }
.chart-bars { display: flex; flex-direction: column; gap: 10px; }
.chart-bar .lab { font-size: 13px; display: flex; justify-content: space-between; margin-bottom: 4px; }
.chart-bar .bar { height: 8px; border-radius: 4px; background: var(--bg-soft-2); overflow: hidden; }
.chart-bar .bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.spark i { flex: 1; background: var(--brand-100); border-radius: 3px 3px 0 0; min-height: 3px; }
.spark i.hi { background: var(--brand); }

.pagination { display: flex; gap: 6px; justify-content: center; padding: 18px 0; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; display: grid; place-items: center; font-size: 13px; background: #fff; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .cur { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .form-list { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero h1 { font-size: 34px; }
  .grid-3, .steps, .price-grid, .create-modes, .site-footer .cols { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .form-list { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: none; }
  .pub-grid { grid-template-columns: 1fr; }
}
