/* 橙图 ChengTu AI — 设计系统(取值来自 design-reference/) */

:root {
  --bg: #FFFBF6;
  --ink: #241C15;
  --ink-2: #5A4F45;
  --ink-3: #8C7A69;
  --brown: #B98A64;
  --brown-2: #B08363;
  --accent: #F0501A;
  --accent-hi: #FF6A2B;
  --grad: linear-gradient(135deg, #FF8A4C, #F0501A);
  --line: #F1E4D6;
  --line-warm: #FBE3C6;
  --hi: #FFF1E4;
  --soft: #FBF3EA;
  --soft-2: #F7F1EA;
  --soft-3: #FFF6EC;
  --ok: #1E8A5B;
  --ok-bg: #E7F6EE;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans SC", "Manrope", sans-serif;
}
::selection { background: #FFD9BC; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }
button { font-family: inherit; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes floatSlow { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.layout { display: flex; min-height: 100vh; width: 100%; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 200px; flex: none; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 24px 14px;
  position: sticky; top: 0; height: 100vh;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px 8px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(240,80,26,0.28);
}
.logo-name { font-family: Manrope, sans-serif; font-weight: 800; font-size: 17px; letter-spacing: 0.2px; color: var(--ink); }
.logo-sub { font-family: Manrope, sans-serif; font-weight: 600; font-size: 10px; letter-spacing: 0.6px; color: var(--brown); text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.active { background: var(--hi); color: var(--accent); font-weight: 700; }
.nav a.active svg { stroke: var(--accent); }
.nav-sep { height: 1px; background: var(--line); margin: 10px 4px; }

.upgrade-card {
  margin-top: auto; padding: 14px 12px; border-radius: 12px;
  background: var(--soft-3); border: 1px solid var(--line-warm);
}
.upgrade-card b { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.upgrade-card span { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }

/* ---------- Buttons ---------- */
.btn-grad {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff; font-weight: 700; border: none; cursor: pointer;
  box-shadow: 0 8px 20px rgba(240,80,26,0.28);
}
.btn-grad:hover { color: #fff; filter: brightness(1.05); }
.btn-grad:disabled { background: #F0C7A6; box-shadow: none; cursor: not-allowed; filter: none; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; border: 1px solid #EEDFD0; color: var(--ink); font-weight: 700; cursor: pointer;
}
.btn-outline:hover { color: var(--ink); background: var(--soft); }

/* ---------- 图片占位(对应设计稿 image-slot)---------- */
.img-slot {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background:
    linear-gradient(45deg, #FAF3EA 25%, transparent 25%, transparent 75%, #FAF3EA 75%),
    linear-gradient(45deg, #FAF3EA 25%, #FFF9F1 25%, #FFF9F1 75%, #FAF3EA 75%);
  background-size: 22px 22px; background-position: 0 0, 11px 11px;
  color: var(--brown-2); font-size: 12px; text-align: center; padding: 8px;
}
.img-slot svg { opacity: 0.55; }
.img-cover { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 工作台通用 ---------- */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; border-bottom: 1px solid var(--line); flex: none; background: #fff;
}
.page-head .crumb { font-size: 12px; color: var(--brown); font-weight: 600; margin-bottom: 2px; }
.page-head .title { font-size: 18px; font-weight: 800; }

.chip {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  font-weight: 600; background: var(--soft-2); color: var(--ink-2); user-select: none;
}
.chip.active { background: var(--hi); color: var(--accent); }

.spinner {
  border-radius: 50%; border: 4px solid var(--line-warm); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

.mode-badge {
  display: none; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--hi); color: var(--accent); font-size: 12px; font-weight: 700;
}
.mode-badge.show { display: inline-flex; }

/* 模板缩略图配色(近似各场景氛围) */
.tpl-thumb { border-radius: 9px; overflow: hidden; aspect-ratio: 1/1; border: 1px solid var(--line); }
.tpl-素雅白台 { background: linear-gradient(160deg, #FFFFFF 30%, #EFEBE4); }
.tpl-灰调影棚 { background: linear-gradient(160deg, #E8E6E3, #B9B5B0); }
.tpl-简约几何 { background: linear-gradient(135deg, #F4E9DC 50%, #E7D5BF 50%); }
.tpl-木纹质感 { background: repeating-linear-gradient(90deg, #D8B58C 0 10px, #CBA478 10px 20px); }
.tpl-新年红金 { background: linear-gradient(160deg, #C8382B, #8E1F14 70%, #E9B855); }
.tpl-双11大促 { background: linear-gradient(135deg, #FF8A4C, #E23A2E); }
.tpl-中秋团圆 { background: radial-gradient(circle at 70% 30%, #F6E3A8 18%, #26355C 19%, #1B2743); }
.tpl-圣诞暖光 { background: radial-gradient(circle at 30% 30%, #F9D9A0 8%, transparent 9%), radial-gradient(circle at 70% 60%, #F9D9A0 6%, transparent 7%), linear-gradient(160deg, #274C3A, #16301F); }
.tpl-纯白背景 { background: #FFFFFF; }
.tpl-奶油米色 { background: linear-gradient(160deg, #F7EFE2, #EBDCC3); }
.tpl-雾霾蓝 { background: linear-gradient(160deg, #C7D3DD, #9FB2C2); }
.tpl-燕麦棕 { background: linear-gradient(160deg, #DECBB2, #C4A98A); }
.tpl-清晨厨房台 { background: linear-gradient(180deg, #FDF6E9 60%, #E4D2B8 60%); }
.tpl-户外野餐 { background: linear-gradient(180deg, #CFE3F5 45%, #9DC46F 45%); }
.tpl-客厅茶几 { background: linear-gradient(180deg, #F2E8DC 55%, #B08363 55%); }
.tpl-窗边阳光 { background: linear-gradient(115deg, #FFF3D6 40%, #F3D9A5 40% 60%, #FFF3D6 60%); }
