/* 码商通 · 企业级落地页 */
:root {
  --ink: #1f1f1f;
  --ink-2: #595959;
  --ink-3: #8c8c8c;
  --brand: #06ae56;
  --brand-hover: #059a4c;
  --brand-dark: #048f47;
  --brand-light: #edf9f1;
  --line: #ebebeb;
  --line-dark: #d9d9d9;
  --bg: #f5f6f8;
  --bg-white: #fff;
  --bg-soft: #fafafa;
  --danger: #e54d42;
  --danger-bg: #fff2f0;
  --max: 1120px;
  --gen-width: 920px;
  --gen-right: 300px;
  --page-pad: 56px;
  --radius: 4px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.03), 0 4px 16px rgba(0,0,0,0.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--bg);
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

.cli-page { background: var(--bg); }
.cli-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.cli-header {
  height: 52px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.cli-header-inner {
  width: 100%; height: 100%; margin: 0;
  padding: 0 var(--page-pad);
  display: flex; align-items: center; justify-content: space-between; gap: 48px;
}
.cli-header-left {
  display: flex; align-items: center; flex: 0 0 auto;
  gap: 0; min-width: 0;
}
.cli-logo {
  display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none;
  flex-shrink: 0; margin-right: 8px;
}
.cli-logo:hover { color: var(--ink); text-decoration: none; }
.cli-logo-mark {
  width: 26px; height: 26px; border-radius: 3px; background: var(--brand);
  position: relative;
}
.cli-logo-mark::after {
  content: ''; position: absolute; inset: 5px;
  border: 2px solid #fff; border-radius: 1px;
}
.cli-logo-text { font-size: 15px; font-weight: 600; letter-spacing: -0.2px; white-space: nowrap; }
.cli-nav-link {
  flex-shrink: 0; padding: 0 10px; height: 52px; line-height: 52px;
  color: var(--ink-2); font-size: 14px; text-decoration: none; transition: color .15s; white-space: nowrap;
}
.cli-nav-link:hover { color: var(--ink); text-decoration: none; }
.cli-nav-link.active { color: var(--brand); font-weight: 500; }
/* 营销页旧结构兼容 */
.cli-nav { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.cli-nav a { color: var(--ink-2); font-size: 14px; text-decoration: none; white-space: nowrap; padding: 0 14px; }
.cli-nav a.active { color: var(--brand); font-weight: 500; }
.cli-header-actions {
  display: flex; align-items: center; gap: 12px; flex: 0 0 auto;
}
.cli-login-link { color: var(--ink-2); font-size: 14px; cursor: pointer; }
.cli-login-link:hover { color: var(--ink); }
.cli-login-status { font-size: 13px; color: var(--brand); margin-right: 4px; }
.cli-btn-console {
  display: inline-flex; align-items: center; height: 32px; padding: 0 16px;
  background: var(--brand); color: #fff; border-radius: 4px; font-size: 14px;
  text-decoration: none; font-weight: 500;
}
.cli-btn-console:hover { background: var(--brand-hover); color: #fff; text-decoration: none; }
.cli-btn-console.sm { height: 28px; padding: 0 12px; font-size: 13px; }
.cli-login-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px var(--page-pad); background: var(--brand-light);
  border-bottom: 1px solid #c8ebd4; font-size: 13px; color: #2d6a4a;
}
.cli-login-banner-icon {
  width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.cli-login-banner .cli-btn-console { margin-left: auto; }

.cli-btn-register {
  height: 30px; line-height: 30px; padding: 0 14px; background: var(--brand);
  color: #fff !important; border-radius: var(--radius); font-size: 13px; font-weight: 500;
}
.cli-btn-register:hover { background: var(--brand-hover); text-decoration: none; }

/* Generator — 生码工具区 */
.cli-generator {
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 36px var(--page-pad) 44px;
}
.cli-generator-wrap {
  max-width: var(--gen-width); width: 100%; margin: 0 auto;
}
.cli-gen-card {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); overflow: hidden;
}

.cli-type-tabs {
  display: flex; flex-wrap: nowrap; border-bottom: 1px solid var(--line);
  padding: 0 12px; overflow-x: auto; background: #fff;
}
.cli-type-tab {
  flex-shrink: 0; padding: 0 16px; height: 48px; line-height: 48px; border: none; background: none;
  font-size: 14px; color: var(--ink-2); cursor: pointer; font-family: inherit;
  position: relative; text-decoration: none; transition: color .15s;
}
.cli-type-tab:hover { color: var(--ink); }
.cli-type-tab.active { color: var(--brand); font-weight: 500; }
.cli-type-tab.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 0;
  height: 2px; background: var(--brand); border-radius: 1px 1px 0 0;
}
.cli-type-more { color: var(--brand); margin-left: auto; }

/* 主体：左编辑 + 右预览，偏高窄比例 */
.cli-gen-body {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--gen-right);
  min-height: 400px;
}
.cli-gen-left {
  padding: 28px 32px; display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
}
.cli-gen-right {
  padding: 20px 22px; background: #f7f8fa;
  display: flex; flex-direction: column; gap: 12px;
}
.cli-gen-right-foot {
  margin-top: auto; display: flex; flex-direction: column; gap: 10px;
  padding-top: 4px;
}

/* 左侧编辑 */
.cli-editor-area {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
}
.cli-editor-area.mode-text { justify-content: stretch; }
.cli-editor-area.mode-compact { justify-content: center; }

.cli-editor-panel { display: none; width: 100%; }
.cli-editor-panel.active { display: block; }

.cli-editor-panel[data-panel="text"].active {
  display: flex; flex-direction: column; height: 100%;
}
.cli-editor-panel textarea {
  width: 100%; flex: 1; min-height: 260px; padding: 16px;
  border: 1px solid var(--line-dark); font-size: 14px; line-height: 1.75;
  font-family: inherit; resize: none; border-radius: 6px; background: #fafbfc; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.cli-editor-panel textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(6,174,86,0.1);
}
.cli-editor-panel textarea::placeholder { color: #b0b0b0; }

.cli-url-field { max-width: 100%; }
.cli-field-label {
  display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--ink);
}
.cli-editor-panel input[type="url"] {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-dark);
  font-size: 14px; font-family: inherit; border-radius: 6px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.cli-editor-panel input[type="url"]:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(6,174,86,0.1);
}
.cli-field-hint {
  margin: 8px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.5;
}

.cli-advanced-tip {
  text-align: center; padding: 28px 20px; background: #fafbfc;
  border: 1px dashed var(--line-dark); border-radius: 8px;
}
.cli-advanced-tip p { margin: 0 0 4px; color: var(--ink); font-weight: 500; font-size: 15px; }
.cli-advanced-tip .sub { font-weight: 400; color: var(--ink-3); margin-bottom: 20px !important; font-size: 13px; }
.cli-advanced-actions { display: flex; justify-content: center; gap: 10px; }
.cli-advanced-actions .cli-btn-ghost { margin-left: 0; }

.cli-gen-foot {
  display: flex; align-items: center; justify-content: flex-start;
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); flex-shrink: 0;
}
.cli-link-advanced { font-size: 14px; color: var(--brand); cursor: pointer; }
.cli-link-advanced:hover { color: var(--brand-hover); }
.cli-btn-generate {
  width: 100%; height: 40px; font-size: 15px; font-weight: 600; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(6,174,86,0.25);
}

/* 右侧预览 */
.cli-preview-toolbar { display: flex; gap: 6px; }
.cli-tool-btn {
  padding: 4px 12px; font-size: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); border-radius: 4px; cursor: pointer;
  text-decoration: none; font-family: inherit; line-height: 1.4;
  transition: border-color .15s, color .15s;
}
.cli-tool-btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

.cli-preview-stage {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 0;
}
.cli-preview-box {
  width: 200px; height: 200px; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; padding: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.cli-qr-placeholder { color: var(--ink-3); font-size: 12px; text-align: center; line-height: 1.5; }
#qr-canvas-wrap { display: flex; align-items: center; justify-content: center; }
#qr-canvas-wrap canvas,
#qr-canvas-wrap img { display: block; width: 180px !important; height: 180px !important; }

.cli-qr-summary {
  margin: 10px 0 0; font-size: 11px; color: var(--ink-3); text-align: center;
}

.cli-preview-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.cli-preview-actions .cli-btn-outline {
  height: 34px; font-size: 12px; padding: 0 8px; justify-content: center;
}

/* Buttons */
.cli-btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 20px; background: var(--brand); color: #fff;
  border: none; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: background .15s;
}
.cli-btn-primary:hover { background: var(--brand-hover); color: #fff; text-decoration: none; }
.cli-btn-primary.full { width: 100%; }
.cli-btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.cli-btn-lg { height: 38px; padding: 0 28px; font-size: 14px; }
.cli-btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 14px; background: #fff; color: var(--ink-2);
  border: 1px solid var(--line-dark); border-radius: var(--radius); font-size: 13px;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.cli-btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.cli-btn-outline:disabled { opacity: 0.4; cursor: not-allowed; }
.cli-btn-outline.full { width: 100%; }
.cli-btn-ghost {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px;
  border: 1px solid var(--line-dark); background: #fff; color: var(--ink-2);
  border-radius: var(--radius); margin-left: 8px; font-size: 13px;
}

/* Sub-pages hero */
.cli-page-hero {
  padding: 48px var(--page-pad) 40px; background: #fff; border-bottom: 1px solid var(--line); text-align: center;
}
.cli-page-hero-inner { max-width: 760px; margin: 0 auto; }
.cli-page-hero h1 { margin: 0 0 12px; font-size: 28px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.cli-page-hero p { margin: 0 auto 24px; max-width: 640px; font-size: 15px; color: var(--ink-2); line-height: 1.7; }
.cli-page-hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.cli-stats-row { padding-top: 28px; padding-bottom: 28px; }
.cli-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center;
}
.cli-stats-grid strong { display: block; font-size: 20px; color: var(--ink); margin-bottom: 4px; }
.cli-stats-grid span { font-size: 13px; color: var(--ink-3); }

.cli-use-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: var(--max); margin: 0 auto; }
.cli-use-card { padding: 20px; background: #fff; border: 1px solid var(--line); }
.cli-use-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.cli-use-card p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; }

.cli-steps { max-width: 800px; margin: 0 auto; }
.cli-step {
  display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.cli-step:last-child { border-bottom: none; }
.cli-step-num {
  flex-shrink: 0; width: 32px; height: 32px; line-height: 32px; text-align: center;
  background: var(--brand-light); color: var(--brand); font-weight: 600; border-radius: 50%;
}
.cli-step h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.cli-step p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.6; }
.cli-highlight-note {
  max-width: 800px; margin: 24px auto 0; padding: 16px 20px; background: var(--brand-light);
  border: 1px solid #b7ebc6; font-size: 14px; color: var(--ink-2); text-align: center;
}

.cli-fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: var(--max); margin: 0 auto; }
.cli-fit-card { padding: 24px; background: #fff; border: 1px solid var(--line); }
.cli-fit-card.ok { border-color: var(--brand); }
.cli-fit-card h3 { margin: 0 0 12px; font-size: 16px; }
.cli-fit-card ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); line-height: 1.8; }

.cli-solution-group { margin-bottom: 36px; }
.cli-solution-group h2 { margin: 0 0 16px; font-size: 18px; font-weight: 600; }

.cli-tpl-page { padding-top: 32px; padding-bottom: 48px; }
.cli-tpl-search {
  display: flex; gap: 8px; max-width: 560px; margin: 0 auto 28px;
}
.cli-tpl-search input {
  flex: 1; height: 40px; padding: 0 12px; border: 1px solid var(--line-dark); font-size: 14px;
}
.cli-tpl-search input:focus { outline: none; border-color: var(--brand); }
.cli-tpl-filter-block { margin-bottom: 20px; }
.cli-tpl-filter-block h3 { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.cli-tpl-tabs-sub { margin-bottom: 8px; }
.cli-tpl-grid-full { grid-template-columns: repeat(4, 1fr); }

.cli-price-grid-full { max-width: 880px; grid-template-columns: repeat(2, 1fr); }
.cli-price-num span { font-size: 14px; color: var(--ink-3); margin-left: 4px; }

.cli-compare-wrap { overflow-x: auto; max-width: var(--max); margin: 0 auto; }
.cli-compare-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 13px; }
.cli-compare-table th, .cli-compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.cli-compare-table th:first-child, .cli-compare-table td:first-child { text-align: left; }
.cli-compare-table th { background: #fafafa; font-weight: 500; color: var(--ink-2); }

.cli-faq-list { max-width: 720px; margin: 0 auto; }
.cli-faq-item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.cli-faq-item h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.cli-faq-item p { margin: 0; font-size: 13px; color: var(--ink-3); line-height: 1.7; }

/* Sections */
.cli-section { padding: 48px var(--page-pad); max-width: var(--max); width: 100%; margin: 0 auto; }
.cli-section-bg {
  background: #fff; max-width: none;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding-top: 48px; padding-bottom: 48px;
}
.cli-section-bg > .cli-section-head,
.cli-section-bg > .cli-tpl-tabs,
.cli-section-bg > .cli-tpl-grid,
.cli-section-bg > .cli-module-grid,
.cli-section-bg > .cli-section-more { max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: var(--page-pad); padding-right: var(--page-pad); }

.cli-section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 28px; flex-wrap: wrap; gap: 8px;
}
.cli-section-head.center { flex-direction: column; align-items: center; text-align: center; }
.cli-section-head h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.3px; }
.cli-section-head p { margin: 8px 0 0; color: var(--ink-3); font-size: 14px; }
.cli-section-head a { font-size: 13px; color: var(--brand); }
.cli-section-more { text-align: center; margin: 24px 0 0; font-size: 13px; }

.cli-solution-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cli-solution-item {
  display: block; padding: 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.cli-solution-item:hover {
  border-color: var(--brand); box-shadow: 0 2px 8px rgba(6,174,86,0.08);
  text-decoration: none; color: inherit;
}
.cli-solution-item strong { display: block; font-size: 14px; margin-bottom: 6px; color: var(--ink); font-weight: 500; }
.cli-solution-item span { font-size: 12px; color: var(--ink-3); line-height: 1.55; }

.cli-tpl-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.cli-tpl-tab {
  padding: 5px 14px; border: 1px solid var(--line); background: #fff;
  border-radius: 2px; font-size: 13px; color: var(--ink-2); cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.cli-tpl-tab:hover { border-color: var(--line-dark); color: var(--ink); }
.cli-tpl-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.cli-tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cli-tpl-card {
  display: block; padding: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s;
  border-left: 3px solid var(--accent, var(--brand));
}
.cli-tpl-card.hidden { display: none; }
.cli-tpl-card:hover { border-color: var(--line-dark); box-shadow: var(--shadow-card); text-decoration: none; color: inherit; }
.cli-tpl-ind { font-size: 11px; color: var(--ink-3); }
.cli-tpl-card h3 { margin: 8px 0 4px; font-size: 14px; font-weight: 500; color: var(--ink); }
.cli-tpl-card p { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }

.cli-layout-row {
  max-width: var(--max); width: 100%; margin: 0 auto; padding: 0 var(--page-pad) 40px;
  display: grid; grid-template-columns: 1fr; gap: 0; align-items: start;
}
.cli-main-col .cli-section { padding-left: 0; padding-right: 0; max-width: none; }

.cli-feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.cli-feature-grid > div { padding: 24px 16px; background: #fff; text-align: center; }
.cli-feature-grid h3 { margin: 0 0 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.cli-feature-grid p { margin: 0; font-size: 12px; color: var(--ink-3); }

.cli-module-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.cli-module-card {
  padding: 20px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cli-module-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 500; color: var(--ink); }
.cli-module-card > p {
  margin: 0 0 14px; min-height: 40px; font-size: 12px; color: var(--ink-3); line-height: 1.6;
}
.cli-module-card ul {
  margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line);
}
.cli-module-card li {
  padding: 8px 0; font-size: 12px; color: var(--ink-2); line-height: 1.4;
  border-bottom: 1px solid var(--line);
}
.cli-module-card li:last-child { border-bottom: none; }

.cli-price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 680px; margin: 0 auto; }
.cli-price-card {
  padding: 28px 24px; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius); text-align: center;
}
.cli-price-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.cli-price-label { margin: 0 0 16px; font-size: 12px; color: var(--ink-3); }
.cli-price-num { font-size: 13px; color: var(--ink-3); margin-bottom: 20px; }
.cli-price-num strong { font-size: 32px; color: var(--ink); font-weight: 600; }
.cli-price-card ul { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; font-size: 13px; color: var(--ink-2); }
.cli-price-card li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.cli-price-card li:last-child { border-bottom: none; }
.cli-price-pro { border-color: var(--brand); position: relative; }

.cli-side-box {
  background: #fff; border: 1px solid var(--line); padding: 16px; margin-bottom: 16px;
}
.cli-side-box h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.cli-news-list { list-style: none; padding: 0; margin: 0; font-size: 12px; color: var(--ink-2); }
.cli-news-list li { padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.cli-news-list span { color: var(--brand); margin-right: 6px; }
.cli-tool-links a { display: block; font-size: 13px; padding: 6px 0; color: var(--ink-2); text-decoration: none; }
.cli-tool-links a:hover { color: var(--brand); }
.cli-side-free ul { margin: 0 0 12px; padding-left: 18px; font-size: 12px; color: var(--ink-2); }

.cli-cta {
  text-align: center; padding: 56px var(--page-pad); background: var(--ink); color: #fff;
}
.cli-cta h2 { margin: 0 0 8px; font-size: 20px; font-weight: 500; letter-spacing: -0.2px; }
.cli-cta p { margin: 0 0 24px; font-size: 14px; color: rgba(255,255,255,0.65); }
.cli-cta .cli-btn-primary { background: var(--brand); color: #fff; height: 40px; padding: 0 32px; }
.cli-cta .cli-btn-primary:hover { background: var(--brand-hover); }
.cli-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cli-cta .cli-btn-outline { height: 40px; padding: 0 32px; border-color: rgba(255,255,255,0.35); color: #fff; }
.cli-cta .cli-btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.cli-gen-notice {
  margin-top: 10px; padding: 8px 12px; border-radius: 8px;
  background: #e8f9ef; color: #067a42; font-size: 13px; text-align: center;
  opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s;
}
.cli-gen-notice.show { opacity: 1; transform: translateY(0); }
.cli-gen-notice a { color: #06ae56; font-weight: 500; margin-left: 6px; }

.cli-code-kind {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin: 12px 0 4px;
}
.cli-code-kind-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); cursor: pointer; user-select: none;
  transition: border-color .15s, color .15s, background .15s;
}
.cli-code-kind-opt input { display: none; }
.cli-code-kind-opt.active {
  border-color: var(--brand); color: var(--brand); background: #e8f9ef; font-weight: 500;
}
.cli-qr-placeholder.err { color: #d93026; font-size: 13px; }
.cli-qr-wxa { display: block; width: 180px; height: 180px; object-fit: contain; }

/* Modal */
.cli-modal {
  display: none; position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.45);
  align-items: center; justify-content: center; padding: 20px;
}
.cli-modal.open { display: flex; }
.cli-modal-dialog {
  width: 100%; max-width: 400px; background: #fff; padding: 28px 24px 20px;
  position: relative; border-radius: 4px;
}
.cli-modal-close {
  position: absolute; right: 12px; top: 8px; border: none; background: none;
  font-size: 22px; color: var(--ink-3); cursor: pointer;
}
.cli-modal-dialog h2 { margin: 0 0 16px; font-size: 18px; }
.cli-modal-sub { margin: -8px 0 12px; font-size: 13px; color: var(--brand); }
.cli-modal-form label { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--ink-2); }
.cli-modal-form input {
  width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line-dark); font-size: 14px;
}
.cli-modal-form input:focus { outline: none; border-color: var(--brand); }
.cli-modal-form .cli-btn-primary { margin-top: 16px; }
.cli-modal-foot { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.cli-modal-qr { max-width: 360px; text-align: center; }
.cli-qr-auth { margin-top: 4px; }
.cli-qr-box { display: flex; flex-direction: column; align-items: center; }
.cli-qr-img-wrap {
  width: 220px; height: 220px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  background: #fafafa; overflow: hidden;
}
.cli-qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cli-qr-app-wrap { margin-top: 12px; text-align: center; }
.cli-qr-app-label { margin: 0 0 6px; font-size: 11px; color: var(--ink-3); }
.cli-qr-app-img {
  display: inline-flex; align-items: center; justify-content: center;
  width: 108px; height: 108px; padding: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 8px;
}
.cli-qr-app-img canvas, .cli-qr-app-img img { width: 96px !important; height: 96px !important; }
.cli-qr-loading { font-size: 13px; color: var(--ink-3); }
.cli-qr-tip { margin: 14px 0 4px; font-size: 15px; font-weight: 600; color: var(--ink-1); }
.cli-qr-sub { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.cli-qr-status { margin: 12px 0 0; font-size: 13px; color: var(--brand); min-height: 20px; }
.cli-qr-status.err { color: var(--danger); }
.cli-qr-status.ok { color: var(--brand); }
.cli-register-qr .cli-qr-img-wrap { margin: 0 auto; }
.cli-alert { padding: 10px 12px; margin-bottom: 12px; font-size: 13px; border-radius: 2px; }
.cli-alert.err { background: var(--danger-bg); color: var(--danger); border: 1px solid #ffccc7; }
.cli-alert.ok { background: var(--brand-light); color: var(--brand); border: 1px solid #b7ebc6; }

/* Register */
.cli-register-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.cli-register-card {
  width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line);
  padding: 32px 28px; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.cli-register-card h1 { margin: 0 0 6px; text-align: center; font-size: 20px; }
.cli-register-card .sub { text-align: center; color: var(--ink-3); margin: 0 0 20px; font-size: 13px; }

/* Logged-in single page */
.logged-in .cli-guest-only { display: none !important; }
.cli-app-tabs { display: flex; gap: 4px; margin-left: 8px; }
.cli-app-tab {
  padding: 6px 14px; font-size: 14px; color: var(--ink-2); text-decoration: none;
  border-radius: 4px; transition: background .15s, color .15s;
}
.cli-app-tab:hover { color: var(--brand); background: var(--brand-light); }
.cli-app-tab.active { color: var(--brand); font-weight: 600; background: var(--brand-light); }
.cli-user-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin-right: 8px; }
.cli-user-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.cli-panel { display: none; }
.cli-panel.active { display: block; }
.cli-app-wrap { max-width: var(--max); margin: 0 auto; padding: 24px var(--page-pad) 48px; }
.cli-app-head { margin-bottom: 20px; }
.cli-app-head h2 { margin: 0 0 6px; font-size: 22px; }
.cli-app-head p { margin: 0; color: var(--ink-3); font-size: 14px; }
.cli-app-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.cli-app-stat {
  background: #fff; border: 1px solid var(--line); padding: 16px; border-radius: 4px;
}
.cli-app-stat .l { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.cli-app-stat strong { font-size: 24px; color: var(--ink-1); }
.cli-app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.cli-app-card {
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 18px 20px; margin-bottom: 16px;
}
.cli-app-card h3 { margin: 0 0 14px; font-size: 16px; }
.cli-app-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cli-app-card-head h3 { margin: 0; }
.cli-app-bars { display: flex; align-items: flex-end; gap: 10px; min-height: 140px; padding-top: 8px; }
.cli-app-bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cli-app-bar { width: 100%; max-width: 36px; background: var(--brand); border-radius: 3px 3px 0 0; opacity: .85; }
.cli-app-bar-item span { font-size: 11px; color: var(--ink-3); }
.cli-app-scenes { display: grid; gap: 8px; }
.cli-app-scene {
  display: flex; justify-content: space-between; align-items: center; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: inherit;
}
.cli-app-scene:hover { border-color: var(--brand); background: var(--brand-light); }
.cli-app-scene strong { font-size: 14px; }
.cli-app-scene span { font-size: 12px; color: var(--ink-3); }
.cli-app-table-wrap { overflow-x: auto; }
.cli-app-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cli-app-table th, .cli-app-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.cli-app-table th { color: var(--ink-3); font-weight: 500; }
.cli-app-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cli-app-actions a { color: var(--brand); text-decoration: none; font-size: 13px; }
.cli-inline-form { display: inline; margin: 0; }
.cli-link-danger { border: none; background: none; color: #e34d59; cursor: pointer; font-size: 13px; padding: 0; }
.cli-link-sm { font-size: 13px; color: var(--brand); text-decoration: none; }
.cli-muted { color: var(--ink-3); font-size: 13px; margin: 0; }
.cli-mine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cli-mine-form label { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--ink-2); }
.cli-mine-form input {
  width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line-dark); font-size: 14px;
}
.cli-mine-form input[readonly] { background: #f7f8fa; color: var(--ink-3); }
.cli-mine-form .cli-btn-primary { margin-top: 16px; }
.cli-storage-bar { height: 8px; background: #eee; border-radius: 4px; overflow: hidden; margin: 12px 0; }
.cli-storage-bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.cli-mine-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.cli-mobile-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: #fff; border-top: 1px solid var(--line);
  grid-template-columns: repeat(3, 1fr);
}
.cli-mobile-nav-item {
  padding: 10px 8px 12px; text-align: center; text-decoration: none;
  color: var(--ink-3); font-size: 13px;
}
.cli-mobile-nav-item.active { color: var(--brand); font-weight: 600; }
@media (max-width: 900px) {
  .logged-in .cli-mobile-nav { display: grid; }
  .logged-in .cli-shell { padding-bottom: 56px; }
  .cli-app-stats { grid-template-columns: repeat(2, 1fr); }
  .cli-app-grid, .cli-mine-grid { grid-template-columns: 1fr; }
  .cli-app-tabs { display: none; }
}

/* Footer */
.cli-footer { background: #2b2b2b; color: #aaa; padding: 40px var(--page-pad) 24px; margin-top: auto; }
.cli-footer-top {
  max-width: var(--max); width: 100%; margin: 0 auto 24px;
  display: grid; grid-template-columns: 220px 1fr; gap: 40px;
}
.cli-footer-brand strong { color: #fff; font-size: 16px; }
.cli-footer-brand p { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: #888; }
.cli-footer-cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.cli-footer-cols h4 { margin: 0 0 12px; color: #fff; font-size: 13px; font-weight: 600; }
.cli-footer-cols a { display: block; font-size: 12px; color: #888; margin-bottom: 8px; text-decoration: none; }
.cli-footer-cols a:hover { color: #fff; text-decoration: none; }
.cli-footer-copy {
  max-width: var(--max); margin: 0 auto; padding-top: 20px; border-top: 1px solid #444;
  text-align: center; font-size: 12px; color: #666;
}

/* ========== 后台共用 ========== */
label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"] {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-dark);
  font-size: 14px; margin-bottom: 14px; background: #fff; border-radius: 2px;
}
input:focus { outline: none; border-color: var(--brand); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 40px; border: none; border-radius: 4px;
  background: var(--brand); color: #fff; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--brand-hover); text-decoration: none; }
.err { background: var(--danger-bg); color: var(--danger); padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 16px 20px; }
.stat .l { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.stat .v { font-size: 26px; font-weight: 600; }
.table-wrap { background: #fff; border: 1px solid var(--line); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #fafafa; color: var(--ink-2); font-weight: 500; }
tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: 2px 8px; font-size: 12px; background: var(--brand-light); color: var(--brand); border: 1px solid #b7ebc6; }
.badge.off { background: #fffbe6; color: #ad8b00; border-color: #ffe58f; }
.muted { color: var(--ink-3); }

@media (min-width: 1280px) {
  :root {
    --page-pad: 72px;
    --gen-width: 1000px;
    --gen-right: 320px;
  }
  .cli-gen-body { min-height: 420px; }
}

@media (min-width: 1600px) {
  :root {
    --page-pad: 96px;
    --gen-width: 1120px;
  }
}

@media (max-width: 1024px) {
  :root { --page-pad: 32px; }
  .cli-header-left .cli-nav-link { display: none; }
  .cli-logo { margin-right: 0; }
  .cli-nav { display: none; }
  .cli-use-grid { grid-template-columns: repeat(2, 1fr); }
  .cli-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cli-fit-grid { grid-template-columns: 1fr; }
  .cli-generator-wrap { max-width: 100%; }
  .cli-gen-body { grid-template-columns: 1fr; min-height: auto; }
  .cli-gen-left { border-right: none; border-bottom: 1px solid var(--line); }
  .cli-editor-panel textarea { min-height: 140px; }
  .cli-preview-stage { min-height: 200px; }
  .cli-solution-grid { grid-template-columns: repeat(2, 1fr); }
  .cli-tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .cli-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .cli-module-grid { grid-template-columns: repeat(2, 1fr); }
  .cli-footer-top { grid-template-columns: 1fr; }
  .cli-footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cli-solution-grid, .cli-tpl-grid, .cli-tpl-grid-full, .cli-feature-grid, .cli-price-grid,
  .cli-use-grid, .cli-stats-grid, .cli-module-grid, .cli-footer-cols { grid-template-columns: 1fr; }
  .cli-feature-grid { grid-template-columns: 1fr; }
  .cli-page-hero h1 { font-size: 22px; }
  .cli-logo-text { font-size: 14px; }
  .cli-type-tab { padding: 0 12px; font-size: 13px; }
}
