/* ════════════════════════════════════════════════════════════════
   Renzea AI · 用户控制台 · 产品原型
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg:        #080B14;
  --surface:   #0F1424;
  --surface-2: #171E32;
  --surface-3: #222B45;
  --surface-4: #2C3655;
  --border:    rgba(255,255,255,0.08);
  --border-2:  rgba(255,255,255,0.14);

  --text:      #F5F7FF;
  --text-2:    #A9B0C6;
  --text-3:    #6D778C;

  --blue:      #1E6FEB;
  --blue-soft: rgba(30,111,235,0.14);
  --corn:      #FFD700;
  --corn-soft: rgba(255,215,0,0.14);
  --green:     #00E656;
  --green-soft:rgba(0,230,86,0.14);
  --cyan:      #00F5D4;
  --cyan-soft: rgba(0,245,212,0.14);
  --pink:      #EB7CB6;
  --pink-soft: rgba(235,124,182,0.14);
  --orange:    #FF8A3D;

  --r: 14px;
  --r-sm: 10px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow: 0 24px 60px rgba(0,0,0,0.45);
  --shadow-sm: 0 8px 24px rgba(0,0,0,0.25);

  --sidebar-w: 268px;
  --sidebar-collapsed-w: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55;
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width .25s ease;
  flex-shrink: 0;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-w);
}

.sidebar-head {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .2px;
  color: var(--text);
}

.brand img {
  height: 34px;
  width: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand span { white-space: nowrap; }

.sidebar.collapsed .brand span { display: none; }

.collapse-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .2s;
}

.collapse-btn:hover { background: var(--surface-3); color: var(--text); }

.sidebar.collapsed .collapse-btn svg { transform: rotate(180deg); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }

.nav-group {
  margin-bottom: 6px;
  border-radius: var(--r);
  overflow: hidden;
}

.nav-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-2);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--r);
  user-select: none;
  transition: .15s;
}

.nav-group-header:hover { background: var(--surface-2); color: var(--text); }

.nav-group-header .icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nav-group-header .chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  transition: transform .2s;
  color: var(--text-3);
}

.nav-group.open .chevron { transform: rotate(180deg); }

.sidebar.collapsed .nav-group-header .label,
.sidebar.collapsed .nav-group-header .chevron { display: none; }

.nav-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}

.nav-group.open .nav-children { max-height: 1200px; }

.nav-item {
  padding: 8px 12px 8px 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  cursor: pointer;
  border-radius: var(--r-sm);
  margin: 2px 6px;
  font-size: 13px;
  transition: .15s;
  position: relative;
}

.nav-item:hover { background: var(--surface-2); color: var(--text); }

.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}

.nav-item .new-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 20px;
  background: var(--pink-soft);
  color: var(--pink);
  font-weight: 700;
}

.sidebar.collapsed .nav-children,
.sidebar.collapsed .nav-item { display: none; }

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.credits {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--r);
  margin-bottom: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--corn);
  box-shadow: 0 0 12px var(--corn);
}

.credits-text { flex: 1; }
.credits-text .label { font-size: 11px; color: var(--text-3); }
.credits-text .value { font-weight: 800; font-size: 15px; }

.sidebar.collapsed .credits-text,
.sidebar.collapsed .user-info { display: none; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  cursor: pointer;
  transition: .15s;
}

.user-pill:hover { background: var(--surface-2); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--corn), var(--orange));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0A0E1A;
  font-size: 13px;
  flex-shrink: 0;
}

.user-info { flex: 1; }
.user-info .name { font-weight: 700; font-size: 13px; }
.user-info .plan { font-size: 11px; color: var(--text-3); }

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

.topbar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(8,11,20,0.72);
  backdrop-filter: blur(14px);
  flex-shrink: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 14px;
}

.breadcrumb .sep { color: var(--text-3); }

.breadcrumb .current {
  color: var(--text);
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px 14px;
  width: 260px;
  transition: .2s;
}

.search-box:focus-within {
  border-color: var(--blue);
  background: var(--surface-2);
}

.search-box svg { color: var(--text-3); flex-shrink: 0; }
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  width: 100%;
  font-size: 13px;
}

.search-box input::placeholder { color: var(--text-3); }

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: .15s;
}

.icon-btn:hover { border-color: var(--border-2); color: var(--text); }

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--pink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* Content */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.content::-webkit-scrollbar { width: 8px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
}

.page-subtitle {
  color: var(--text-2);
  margin-top: 6px;
  max-width: 640px;
}

.page-actions { display: flex; gap: 10px; flex-shrink: 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: .15s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, #1658BC 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(30,111,235,0.25);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(30,111,235,0.32); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-2); }

.btn-corn {
  background: linear-gradient(135deg, var(--corn), #FFB300);
  color: #0A0E1A;
  font-weight: 800;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.btn-ghost:hover { color: var(--text); border-color: var(--border-2); }

/* Dashboard cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .search-box { width: 180px; }
}
@media (max-width: 700px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
  .content { padding: 16px; }
  .search-box { display: none; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  transition: .2s;
}

.card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.card-highlight {
  background: linear-gradient(135deg, var(--blue-soft) 0%, rgba(30,111,235,0.06) 100%);
  border-color: rgba(30,111,235,0.25);
}

.card-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-desc {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 12px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-2);
}

.card-tag.blue { background: var(--blue-soft); color: var(--blue); }
.card-tag.corn { background: var(--corn-soft); color: #DAA700; }
.card-tag.green { background: var(--green-soft); color: var(--green); }
.card-tag.pink { background: var(--pink-soft); color: var(--pink); }
.card-tag.cyan { background: var(--cyan-soft); color: var(--cyan); }

.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-size: 18px;
}

.icon-box.blue { background: var(--blue-soft); color: var(--blue); }
.icon-box.corn { background: var(--corn-soft); color: var(--corn); }
.icon-box.green { background: var(--green-soft); color: var(--green); }
.icon-box.pink { background: var(--pink-soft); color: var(--pink); }
.icon-box.cyan { background: var(--cyan-soft); color: var(--cyan); }

/* Agent page */
.agent-hero {
  display: flex;
  gap: 20px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.agent-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--corn), var(--orange));
  display: grid;
  place-items: center;
  font-size: 40px;
  flex-shrink: 0;
  box-shadow: 0 12px 30px rgba(255,215,0,0.18);
}

.agent-info { flex: 1; }
.agent-info h2 { font-size: 22px; margin-bottom: 6px; }
.agent-info p { color: var(--text-2); margin-bottom: 14px; }

.agent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 5px 11px;
  border-radius: 20px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.chat-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-history {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 80%;
  padding: 12px 15px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

.chat-input-row {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  background: var(--surface-2);
}

.chat-input-row input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  color: var(--text);
  outline: none;
  font-size: 13px;
}

.chat-input-row input::placeholder { color: var(--text-3); }

/* Workspace / Canvas mock */
.workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.ws-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
}

.ws-toolbar .tool {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
}

.ws-canvas {
  min-height: 320px;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  background: repeating-linear-gradient(45deg, var(--surface) 0, var(--surface) 10px, rgba(255,255,255,0.015) 10px, rgba(255,255,255,0.015) 20px);
}

.thumb {
  aspect-ratio: 16/10;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 12px;
  position: relative;
  overflow: hidden;
}

.thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(30,111,235,0.08) 100%);
}

.thumb.active { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft); }

/* Tables */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--surface-2);
  color: var(--text-2);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* Forms */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  max-width: 720px;
}

.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.form-row textarea { min-height: 120px; resize: vertical; }

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus { border-color: var(--blue); }

/* Empty / welcome */
.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-2);
}

.welcome h2 { font-size: 22px; margin-bottom: 10px; color: var(--text); }
.welcome p { max-width: 520px; margin-bottom: 24px; }

/* Misc */
.section-title {
  font-size: 15px;
  font-weight: 800;
  margin: 24px 0 14px;
  color: var(--text);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 900px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
}

.stat-card .value {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-2);
}

.progress-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 3px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.kanban-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
}

.kanban-col h4 {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-col h4 .count {
  background: var(--surface-3);
  color: var(--text);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
}

.kanban-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  font-size: 12px;
}

.kanban-card .tag { margin-top: 8px; }

/* Toggle switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }

.switch {
  width: 40px;
  height: 22px;
  background: var(--surface-3);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text);
  transition: .2s;
}

.switch.on {
  background: var(--green);
}

.switch.on::after {
  left: 20px;
}

/* Utility: hidden */
.hidden { display: none !important; }

/* ════════════════════════════════════════════════════════════════
   Renzea AI · 控制台 · 全局交互组件与页面模块（P4/P5 补齐）
   toast / modal / 下拉 / 灯箱 / 列表详情 / 工作流 / 图库瓦片 /
   工具生成 / Demo 徽标 / 移动端抽屉
   ════════════════════════════════════════════════════════════════ */

/* ── toast（右下角堆叠） ───────────────────────────── */
#toastStack { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow-sm); pointer-events: auto; animation: rz-toast-in .22s ease; }
.toast.success { border-color: rgba(0,230,86,.45); }
.toast.error { border-color: rgba(255,84,84,.5); }
.toast .t-icon { font-size: 14px; line-height: 1; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .26s; }
@keyframes rz-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── modal ────────────────────────────────────────── */
#modalRoot { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }
.modal-overlay { position: fixed; inset: 0; background: rgba(3,6,14,.72); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; pointer-events: auto; animation: rz-fade .18s ease; }
.modal-box { width: 480px; max-width: 100%; max-height: 86vh; overflow: auto; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: rz-pop .2s ease; }
.modal-box.wide { width: 680px; }
@keyframes rz-fade { from { opacity: 0; } }
@keyframes rz-pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 15px; }
.modal-close { border: none; background: transparent; color: var(--text-3); font-size: 13px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-body { padding: 18px 20px; font-size: 13.5px; color: var(--text-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* ── 下拉（搜索 / 通知中心） ───────────────────────── */
#dropdownRoot { position: fixed; inset: 0; z-index: 8000; pointer-events: none; }
.drop-panel { position: fixed; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r); box-shadow: var(--shadow); max-height: 440px; overflow: auto; pointer-events: auto; animation: rz-pop .16s ease; }
.drop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; }
.drop-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: .12s; }
.drop-item + .drop-item { border-top: 1px solid var(--border); }
.drop-item:hover { background: var(--surface-2); }
.drop-item.read { opacity: .45; }
.drop-icon { font-size: 16px; flex-shrink: 0; }
.drop-text { font-size: 13px; color: var(--text); flex: 1; }
.drop-sub { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.drop-read { flex-shrink: 0; border: 1px solid var(--border-2); background: transparent; color: var(--text-2); font-size: 11px; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.drop-read:hover { color: var(--text); border-color: var(--text-3); }
.drop-empty { padding: 20px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ── 灯箱（素材预览） ─────────────────────────────── */
.lb-stage { height: 320px; border-radius: var(--r-sm); display: grid; place-items: center; }
.lb-emoji { font-size: 88px; }
.lb-meta { margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.lb-name { font-weight: 700; font-size: 14px; flex: 1; }
.lb-sub { color: var(--text-3); font-size: 12px; margin-top: 2px; }

/* ── 列表详情 ─────────────────────────────────────── */
.detail-box { display: flex; flex-direction: column; gap: 8px; }
.detail-row { display: flex; gap: 14px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 13px; }
.detail-k { width: 96px; color: var(--text-3); flex-shrink: 0; }
.detail-v { color: var(--text); }

/* ── 工作流（步骤运行） ───────────────────────────── */
.wf-steps { display: flex; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.wf-step { display: flex; align-items: center; }
.wf-num { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--border-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--text-2); flex-shrink: 0; transition: .2s; }
.wf-name { margin: 0 12px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.wf-line { width: 44px; height: 1px; background: var(--border-2); }
.wf-step.running .wf-num { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.wf-step.running .wf-name { color: var(--text); }
.wf-step.done .wf-num { background: var(--green-soft); border-color: var(--green); color: var(--green); }

/* ── 图库 / 画布 瓦片 ─────────────────────────────── */
#galleryCanvas, #canvasArea { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.tile { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-sm); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; overflow: hidden; transition: .18s; }
.tile:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow-sm); }
.t-emoji { font-size: 34px; }
.t-name { font-size: 11.5px; color: var(--text-2); padding: 0 8px; text-align: center; }
.t-tag { position: absolute; left: 8px; top: 8px; font-size: 10px; background: rgba(8,11,20,.72); border: 1px solid var(--border-2); padding: 2px 7px; border-radius: 20px; color: var(--text-2); }
.fav-btn { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(8,11,20,.65); color: var(--text-3); font-size: 13px; cursor: pointer; transition: .15s; }
.fav-btn:hover { color: var(--corn); transform: scale(1.1); }
.fav-btn.on { color: var(--corn); background: var(--corn-soft); }

/* ── 工具（上传区 + 生成进度） ────────────────────── */
.upload-zone { border: 1.5px dashed var(--border-2); background: var(--surface-2); border-radius: var(--r-sm); padding: 22px; text-align: center; color: var(--text-2); font-size: 13px; line-height: 1.7; cursor: pointer; transition: .15s; }
.upload-zone:hover { border-color: var(--blue); background: var(--blue-soft); }
.upload-zone > span:first-child { display: block; font-size: 30px; margin-bottom: 8px; }
.gen-status { font-size: 12.5px; color: var(--text-3); margin-top: 8px; }

/* ── 侧栏细节 ─────────────────────────────────────── */
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item.deep { padding-left: 58px; font-size: 12.5px; }

/* ── Demo 徽标 ────────────────────────────────────── */
.demo-badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .6px; color: var(--corn); background: var(--corn-soft); border: 1px solid rgba(255,215,0,.35); padding: 2px 9px; border-radius: 20px; flex-shrink: 0; }

/* ── 移动端：汉堡按钮 + 抽屉（<900px） ────────────── */
.menu-btn { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; border: none; background: transparent; color: var(--text-2); cursor: pointer; border-radius: 8px; flex-shrink: 0; }
.menu-btn:hover { background: var(--surface-3); color: var(--text); }
@media (max-width: 899px) {
  .menu-btn { display: grid; place-items: center; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 700; transform: translateX(-105%); transition: transform .25s ease; width: min(300px, 84vw); box-shadow: var(--shadow); }
  .app.drawer-open .sidebar { transform: none; }
  .app.drawer-open::after { content: ''; position: fixed; inset: 0; background: rgba(3,6,14,.6); z-index: 600; }
  .sidebar.collapsed { width: min(300px, 84vw); }
  .sidebar.collapsed .nav-children { display: block; max-height: none; }
  .sidebar.collapsed .nav-item { display: flex; }
  .sidebar.collapsed .brand span,
  .sidebar.collapsed .nav-group-header .label,
  .sidebar.collapsed .nav-group-header .chevron { display: block; }
  .breadcrumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
}
