@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=DM+Sans:wght@400;500;600;700&display=swap');

/* === PROTOTYPE CSS (from prototype HTML) === */

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

:root {
  --brand: #6366f1;
  --brand-light: #818cf8;
  --brand-dark: #4f46e5;
  --accent-pink: #f472b6;
  --accent-teal: #2dd4bf;
  --accent-gold: #fbbf24;
  --accent-violet: #a78bfa;
  --bg-dark: #1e1b2e;
  --bg-panel: #252238;
  --bg-card: rgba(38, 35, 58, 0.95);
  --border: #3d3854;
  --text: #e8e6f0;
  --text-dim: #9895a8;
  --text-muted: #8a86a0;
  --surface: #252238;
  --surface2: #3d3854;
  --primary: #6366f1;
  --success: #2dd4bf;
  --font-pixel: 'Press Start 2P', monospace;
  --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body { background: #1e1b2e; color: var(--text); font-family: var(--font-ui); min-height: 100vh; }


/* Top bar */
#topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(30, 27, 46, 0.95);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
/* Fix8 — brand block: mark + main title + V1.2 badge over tagline */
#topbar .brand {
  display: flex; flex-direction: column;
  gap: 2px; line-height: 1.1;
}
#topbar .brand-row {
  display: flex; align-items: center; gap: 9px;
}
#topbar .brand-mark {
  font-family: var(--font-pixel);
  font-size: 9px; letter-spacing: 1.4px;
  color: var(--brand-light);
  opacity: 0.7;
  padding-top: 2px;
}
#topbar .brand-title {
  font-family: var(--font-ui);
  font-size: 16px; font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
  background: linear-gradient(180deg, #fff 0%, #d4d2e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
#topbar .brand-version {
  font-family: var(--font-pixel);
  font-size: 8px; font-weight: 700;
  letter-spacing: 0.6px;
  padding: 2px 6px 1px;
  background: linear-gradient(135deg, var(--brand), var(--accent-pink));
  color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}
#topbar .brand-tagline {
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}
#topbar .brand-tagline .bt-sep {
  color: var(--accent-pink);
  margin: 0 6px;
  opacity: 0.7;
}
#topbar .nav-btns { display: flex; gap: 10px; }
#topbar .nav-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
}
#topbar .nav-btn:hover { border-color: var(--brand); color: #fff; }
#topbar .nav-btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
#topbar .nav-btn.primary:hover { background: var(--brand-dark); }

/* Navigation tabs (replaces buttons) */
.topbar-nav {
  display: flex; align-items: stretch;
  height: 100%;
  gap: 0;
  margin: 0;
}
.topbar-nav-item {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 0 20px;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  background: none; border: none;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.topbar-nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}
.topbar-nav-item.active {
  color: #fff;
}
.topbar-nav-item.active::after {
  content: '';
  position: absolute; bottom: 0; left: 12px; right: 12px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent-pink));
  border-radius: 2px 2px 0 0;
}
.topbar-nav-item .nav-icon {
  display: flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  opacity: 0.6;
}
.topbar-nav-item .nav-icon svg { flex-shrink: 0; }
.topbar-nav-item:hover .nav-icon { opacity: 0.85; }
.topbar-nav-item.active .nav-icon { opacity: 1; }
/* Topbar nav dropdown (我的办公室 → 梦/盗/聊天) */
.topbar-nav-dropdown {
  position: relative;
  display: flex; align-items: stretch; height: 100%;
}
.topbar-dd-chevron {
  font-size: 10px; opacity: 0.5; margin-left: 2px;
  transition: transform 0.2s;
}
.topbar-nav-dropdown.open .topbar-dd-chevron { transform: rotate(180deg); }
.topbar-dd-menu {
  display: none;
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 240px;
  background: #1a1730;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 300;
  padding: 6px;
  animation: topbarDdIn 0.18s ease;
}
.topbar-nav-dropdown.open .topbar-dd-menu { display: block; }
@keyframes topbarDdIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.topbar-dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
}
.topbar-dd-item:hover { background: rgba(255,255,255,0.06); }
.topbar-dd-item.active { background: rgba(99,102,241,0.15); }
.topbar-dd-item .tdd-icon {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: rgba(129, 140, 248, 0.1);
  border-radius: 7px;
  flex-shrink: 0;
}
.topbar-dd-item.active .tdd-icon { background: rgba(99,102,241,0.25); }
.topbar-dd-item .tdd-name { font-size: 13px; font-weight: 600; color: var(--text); }
.topbar-dd-item .tdd-meta { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
#topbar .user-info {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 500;
}
#topbar .user-info .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent-pink));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 10px; color: #fff;
}

/* Wallet + Avatar button */
#nav-wallet-btn {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px; padding: 3px 3px 3px 12px;
  cursor: pointer; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
#nav-wallet-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}
#nav-wallet {
  font-size: 12px; color: #22c55e; font-weight: 600;
  margin-right: 8px; white-space: nowrap;
}
.nwb-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--accent-pink));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 10px; color: #fff; font-weight: 600;
}

/* User Profile Overlay */
#profile-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 600; background: transparent;
}

/* User Profile Panel */
#profile-panel {
  display: none; position: fixed; top: 56px; right: 16px;
  width: 300px; background: #1a1730;
  border: 1px solid var(--border); border-radius: 12px;
  z-index: 610; overflow-y: auto; max-height: calc(100vh - 72px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  animation: ppSlideIn 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}
#profile-panel.active { display: block; }
@keyframes ppSlideIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pp-header {
  padding: 24px 20px 16px; text-align: center; position: relative;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.1));
  border-bottom: 1px solid var(--border);
}
.pp-avatar {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent-pink));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 18px; color: #fff; font-weight: 700;
}
.pp-name { font-size: 16px; font-weight: 700; color: #fff; }
.pp-role { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.pp-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--text-dim); font-size: 20px;
  cursor: pointer; line-height: 1; padding: 4px;
  transition: color 0.2s;
}
.pp-close:hover { color: #fff; }
.pp-section {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pp-label {
  font-size: 10px; font-weight: 700; color: var(--text-dim);
  letter-spacing: 0.5px; margin-bottom: 6px;
}
.pp-value { font-size: 13px; color: var(--text-light); }
.pp-wallet-amount {
  font-size: 28px; font-weight: 700; color: #22c55e;
  font-variant-numeric: tabular-nums; margin-bottom: 12px;
}
.pp-wallet-actions { display: flex; gap: 10px; }
.pp-btn {
  flex: 1; padding: 8px 0; border-radius: 8px; border: none;
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.pp-btn:active { transform: scale(0.97); }
.pp-btn-deposit {
  background: #22c55e; color: #fff;
}
.pp-btn-deposit:hover { background: #16a34a; }
.pp-btn-withdraw {
  background: rgba(255,255,255,0.08); color: var(--text-light);
  border: 1px solid var(--border);
}
.pp-btn-withdraw:hover { background: rgba(255,255,255,0.12); }
.pp-stats {
  display: flex; gap: 0; justify-content: space-between;
}
.pp-stat-item {
  flex: 1; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.pp-stat-val { font-size: 16px; font-weight: 700; color: #fff; }
.pp-stat-lbl { font-size: 10px; color: var(--text-dim); }
.pp-btn-logout {
  width: 100%; padding: 10px 0; border-radius: 8px;
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  color: #ef4444; font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background 0.2s, border-color 0.2s;
  letter-spacing: 0.3px;
}
.pp-btn-logout:hover {
  background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4);
}
.pp-btn-logout:active { transform: scale(0.97); }

/* Credential management */
.pp-credentials-section { max-height: 280px; overflow-y: auto; }
.pp-cred-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pp-cred-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--surface2); border-radius: 8px; padding: 10px 12px;
}
.pp-cred-info { flex: 1; min-width: 0; }
.pp-cred-name { font-size: 13px; font-weight: 600; color: #fff; }
.pp-cred-status { font-size: 11px; margin-left: 6px; }
.pp-cred-active { color: var(--success); }
.pp-cred-revoked { color: var(--text-dim); }
.pp-cred-id, .pp-cred-token { font-size: 11px; color: var(--text-dim); margin-top: 3px; word-break: break-all; }
.pp-cred-id code, .pp-cred-token code { font-family: var(--font-mono); background: rgba(255,255,255,0.06); padding: 1px 4px; border-radius: 3px; font-size: 10px; }
.pp-cred-revoke {
  font-size: 11px; color: #ef4444; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; flex-shrink: 0; font-family: var(--font-ui);
}
.pp-cred-revoke:hover { background: rgba(239,68,68,0.2); }
.pp-cred-add { display: flex; gap: 8px; align-items: center; }
.pp-cred-input {
  flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--surface2);
  background: var(--surface); color: #fff; font-size: 12px; font-family: var(--font-ui);
}
.pp-cred-input:focus { border-color: var(--primary); outline: none; }

/* Skill downloads */
.pp-skills-section { max-height: 200px; overflow-y: auto; }
.pp-skill-list { display: flex; flex-direction: column; gap: 6px; }
.pp-skill-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--surface2); border-radius: 8px;
}
.pp-skill-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.pp-skill-name { font-size: 12px; color: #fff; }
.pp-skill-size { font-size: 11px; color: var(--text-dim); }
.pp-skill-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pp-skill-copy {
  font-size: 11px; color: var(--text-dim); background: rgba(255,255,255,0.06);
  border: 1px solid var(--surface2); border-radius: 6px; padding: 3px 8px;
  cursor: pointer; font-family: var(--font-ui);
}
.pp-skill-copy:hover { background: rgba(255,255,255,0.1); color: #fff; }
.pp-skill-dl {
  font-size: 11px; color: var(--primary); text-decoration: none; font-weight: 600;
  padding: 3px 8px; border-radius: 6px; background: rgba(108,92,231,0.15);
}
.pp-skill-dl:hover { background: rgba(108,92,231,0.25); }

/* Agent connection info in cards */
.rv-card-conn {
  display: flex; align-items: center; gap: 6px; padding: 6px 14px;
  font-size: 11px; color: var(--text-dim); border-top: 1px solid var(--surface2);
}
.rv-conn-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.rv-conn-dot.online { background: var(--success); box-shadow: 0 0 4px var(--success); }
.rv-conn-dot.offline { background: var(--text-dim); }
.rv-conn-label { font-weight: 600; }
.rv-conn-machine { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }

/* Chat bar */

/* Searching overlay */

/* Match panel */

/* Focus View */

.bot-card .bot-detail { display: none; }
.bot-card .back-btn { display: none; }

/* ========= MY OFFICE VIEW ========= */
#office-view {
  display: none;
  position: fixed; inset: 0;
  background: var(--bg-dark);
  z-index: 50;
  padding-top: 56px;
}
#office-view.active { display: flex; }

#office-sidebar {
  display: none;
}
/* Section wrapper (collapsible) */
.sb-section { display: flex; flex-direction: column; }
.sb-section + .sb-section { margin-top: 4px; }
.sb-section .sb-sec-body {
  display: flex; flex-direction: column; gap: 2px;
  transition: opacity 0.15s;
}
.sb-section.collapsed .sb-sec-body { display: none; }
.sb-section.collapsed .sb-chev { transform: rotate(-90deg); }
/* Hide create-btn until section header is hovered (compact mode) */
.sb-section .create-group-btn { opacity: 0.45; }
.sb-section:hover .create-group-btn { opacity: 1; }

.sidebar-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  padding: 8px 6px 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex; align-items: center; gap: 7px;
  cursor: pointer;
  user-select: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.sidebar-label:hover { color: var(--text-dim); background: rgba(255,255,255,0.02); }
.sidebar-label .sb-chev {
  font-size: 8px;
  color: var(--text-muted);
  transition: transform 0.18s;
  display: inline-block;
  width: 9px;
}
.sidebar-label .sb-sec-title { flex: 1; }
.sidebar-label .sb-count {
  font-family: var(--font-pixel);
  font-size: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.sb-section.collapsed .sidebar-label .sb-count {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--brand-light);
}
.sidebar-label .badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%; display: inline-block;
}
.sidebar-label .badge-dot.rent { background: var(--accent-gold); }
.sidebar-label .badge-dot.hire { background: var(--accent-pink); }
.sidebar-label .badge-dot.group { background: var(--accent-gold); }

.sb-bot {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.sb-bot:hover { background: rgba(99, 102, 241, 0.06); border-color: rgba(99, 102, 241, 0.15); }
.sb-bot.active { background: rgba(99, 102, 241, 0.1); border-color: var(--brand); }
.sb-bot.active::before {
  content: ''; position: absolute; left: -3px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 2px;
  background: var(--brand);
}
.sb-bot .sb-avatar {
  width: 34px; height: 34px;
  flex-shrink: 0;
  background: rgba(14, 12, 28, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  image-rendering: pixelated;
}
.sb-bot .sb-avatar canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 26px; height: 26px;
}
.sb-bot .sb-info { flex: 1; min-width: 0; }
.sb-bot .sb-name {
  font-size: 12px; font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
  display: flex; align-items: center; gap: 6px;
}
.sb-bot .sb-badge {
  font-size: 9px; font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
/* Fix7 — state hue encoding: working=teal, idle=gold, listed=pink, rented=violet */
.sb-badge.for-rent {
  background: rgba(244, 114, 182, 0.12);
  color: var(--accent-pink);
  border: 1px solid rgba(244, 114, 182, 0.3);
}
.sb-badge.hired {
  background: rgba(244, 114, 182, 0.12);
  color: var(--accent-pink);
  border: 1px solid rgba(244, 114, 182, 0.3);
}
.sb-badge.rented-out {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-violet);
  border: 1px solid rgba(167, 139, 250, 0.35);
  cursor: help;
}
.sb-state {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.sb-state.working { color: var(--accent-teal); }
.sb-state.resting { color: var(--accent-gold); }
.sb-action-btn {
  flex-shrink: 0;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.sb-action-btn.rent-out {
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand);
  border: 1px solid rgba(99, 102, 241, 0.4);
}
.sb-action-btn.rent-out:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.sb-action-btn.return {
  background: rgba(244, 114, 182, 0.1);
  color: var(--accent-pink);
  border: 1px solid rgba(244, 114, 182, 0.4);
}
.sb-action-btn.return:hover {
  background: var(--accent-pink);
  color: #fff;
  border-color: var(--accent-pink);
}
.sb-bot .sb-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-bot .sb-expire {
  font-size: 11px;
  color: #f59e0b;
  margin-top: 2px;
}

#office-main {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
}

#office-canvas-wrap {
  flex-shrink: 0;
  display: flex; justify-content: center;
  background: #1a1730;
  padding: 8px 0;
  position: relative;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              padding 0.45s cubic-bezier(0.25, 1, 0.5, 1),
              opacity 0.3s ease;
  max-height: 300px;
  opacity: 1;
}
#office-canvas-wrap.collapsed {
  max-height: 0;
  padding: 0;
  opacity: 0;
}
#office-canvas-toggle-bar {
  display: flex; justify-content: center; align-items: center;
  flex-shrink: 0;
  background: linear-gradient(to bottom, #1a1730 0%, var(--bg-dark) 100%);
  border-bottom: 1px solid var(--border);
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, padding 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
}
#office-canvas-toggle-bar:hover {
  background: linear-gradient(to bottom, #221f3a 0%, var(--bg-dark) 100%);
}
/* --- Minimal handle (map expanded) --- */
#office-canvas-toggle-bar .toggle-inner {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 0 8px;
  gap: 4px;
  transition: opacity 0.25s, transform 0.3s;
}
#office-canvas-toggle-bar .toggle-handle {
  width: 36px; height: 4px;
  background: rgba(255,255,255,0.12);
  border-radius: 2px;
  transition: background 0.3s, width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
#office-canvas-toggle-bar:hover .toggle-handle {
  background: rgba(255,255,255,0.28);
  width: 44px;
}
#office-canvas-toggle-bar .toggle-chevron {
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), color 0.3s;
  line-height: 1;
}
#office-canvas-toggle-bar:hover .toggle-chevron {
  color: rgba(255,255,255,0.45);
}
#office-canvas-toggle-bar.collapsed .toggle-chevron {
  transform: rotate(180deg);
}
/* --- Status strip (map collapsed) --- */
#office-canvas-toggle-bar .toggle-status-strip {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  width: 100%; padding: 0 24px; box-sizing: border-box;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              opacity 0.3s ease 0.05s,
              padding 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
#office-canvas-toggle-bar.collapsed .toggle-status-strip {
  max-height: 44px; opacity: 1; padding: 10px 24px;
}
#office-canvas-toggle-bar.collapsed .toggle-inner {
  position: absolute; opacity: 0; pointer-events: none;
  transform: translateY(-8px);
}
.tss-avatars {
  display: flex; gap: -4px; flex-shrink: 0;
}
.tss-avatars canvas {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--bg-dark);
  margin-left: -6px; position: relative;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.tss-avatars canvas:first-child { margin-left: 0; }
.tss-divider {
  width: 1px; height: 16px; background: rgba(255,255,255,0.08); flex-shrink: 0;
}
.tss-stat {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: rgba(255,255,255,0.5);
  white-space: nowrap;
}
.tss-stat .tss-val {
  color: rgba(255,255,255,0.85); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tss-stat .tss-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
/* Fix7: working=teal, idle=gold, hired uses brand */
.tss-stat .tss-dot.green { background: var(--accent-teal); box-shadow: 0 0 6px rgba(45,212,191,0.5); }
.tss-stat .tss-dot.amber { background: var(--accent-gold); box-shadow: 0 0 6px rgba(251,191,36,0.4); }
.tss-stat .tss-dot.blue  { background: var(--brand); box-shadow: 0 0 6px rgba(99,102,241,0.4); }
.tss-expand-hint {
  font-size: 10px; color: rgba(255,255,255,0.2);
  margin-left: auto; display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
  transition: color 0.3s;
}
#office-canvas-toggle-bar:hover .tss-expand-hint {
  color: rgba(255,255,255,0.45);
}
.tss-expand-hint .tss-chevron-down {
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
#office-canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  display: block;
}

#office-content {
  flex: 1; display: flex; flex-direction: column; overflow: hidden;
}

#office-empty {
  flex: 1; display: flex;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
  padding: 0 32px;
}
#office-empty .empty-arrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600;
  color: var(--brand-light);
  animation: emptyArrowNudge 1.6s ease-in-out infinite;
}
#office-empty .empty-arrow::before {
  content: '';
  width: 28px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-light));
  border-radius: 1px;
}
#office-empty .empty-arrow svg { flex-shrink: 0; }
#office-empty .empty-hint {
  font-size: 12px; color: var(--text-muted); opacity: 0.65;
  max-width: 280px; text-align: center; line-height: 1.5;
}
@keyframes emptyArrowNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-6px); }
}

/* Chat */
#office-chat {
  flex: 1; display: none;
  flex-direction: column; overflow: hidden;
}
#office-chat.active { display: flex; }
.oc-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0;
  background: rgba(30, 27, 46, 0.4);
}
.oc-header .oc-bot-info { display: flex; align-items: center; gap: 14px; }
.oc-header .oc-bot-avatar {
  width: 40px; height: 40px;
  background: rgba(14, 12, 28, 0.6);
  border: 2px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  image-rendering: pixelated; flex-shrink: 0;
}
.oc-header .oc-bot-avatar canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 30px; height: 30px;
}
.oc-header .oc-bot-name { font-size: 15px; font-weight: 700; color: #fff; }
/* Fix7: listed/hired=pink (default; JS overrides for groups) */
.oc-header .oc-bot-status { font-size: 12px; color: var(--accent-pink); font-weight: 500; }
.oc-header .oc-bot-expire { font-size: 11px; color: var(--accent-gold); margin-left: 8px; }
/* Bot-detail header — 3-tier hierarchy: dream=primary / info=ghost / manage=text */
.oc-header .oc-actions { display: flex; gap: 8px; align-items: center; }
.oc-header .oc-dream-btn {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 700;
  padding: 8px 14px;
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  border: 1px solid rgba(129, 140, 248, 0.6);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: filter 0.2s, transform 0.12s, box-shadow 0.2s;
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 4px 14px rgba(99, 102, 241, 0.3);
}
.oc-header .oc-dream-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 18px rgba(99, 102, 241, 0.45);
}
.oc-header .oc-dream-btn:active { transform: translateY(0); }
.oc-header .oc-dream-btn.active {
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.55), 0 4px 14px rgba(99, 102, 241, 0.3);
}
.oc-header .oc-dream-btn .dream-icon {
  width: 14px; height: 14px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.oc-header .oc-info-btn {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.18s;
}
.oc-header .oc-info-btn:hover {
  border-color: rgba(99, 102, 241, 0.55);
  color: #fff;
}
.oc-header .oc-info-btn.active {
  border-color: var(--brand);
  color: var(--brand-light);
  background: rgba(99,102,241,0.08);
}
.oc-header .oc-action-btn {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s;
}
.oc-action-btn.manage {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 7px 10px;
}
.oc-action-btn.manage:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.oc-messages {
  flex: 1; padding: 20px 24px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.oc-msg {
  max-width: 70%;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.7;
  border-radius: 14px;
}
.oc-msg.bot {
  background: rgba(38, 35, 58, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  align-self: flex-start;
  color: var(--text);
}
.oc-msg.user {
  background: var(--brand);
  border-radius: 14px 14px 4px 14px;
  align-self: flex-end;
  color: #fff;
}
.oc-input-row {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; flex-shrink: 0;
  background: rgba(30, 27, 46, 0.4);
}
.oc-input-row input {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 14px 16px;
  background: rgba(14, 12, 28, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: #fff; outline: none;
}
.oc-input-row input:focus { border-color: var(--brand); }
.oc-input-row input::placeholder { color: var(--text-muted); }
.oc-input-row button {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  padding: 14px 20px;
  background: var(--brand);
  border: none; border-radius: 10px;
  color: #fff; cursor: pointer;
}
.oc-input-row button:hover { background: var(--brand-dark); }

/* Group message */
.oc-msg.bot-group {
  max-width: 75%;
  display: flex; gap: 10px;
  align-items: flex-start;
  padding: 12px 16px;
  background: rgba(38, 35, 58, 0.9);
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  align-self: flex-start;
}
.oc-msg.bot-group .gm-avatar {
  width: 32px; height: 32px;
  flex-shrink: 0;
  background: rgba(14, 12, 28, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  image-rendering: pixelated;
}
.oc-msg.bot-group .gm-avatar canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 24px; height: 24px;
}
.oc-msg.bot-group .gm-content { flex: 1; }
.oc-msg.bot-group .gm-name { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.oc-msg.bot-group .gm-text { font-size: 14px; color: var(--text); line-height: 1.7; }

/* Create Group button */
.create-group-btn {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600;
  width: 100%;
  padding: 6px 8px;
  margin-top: 4px;
  background: rgba(99, 102, 241, 0.06);
  border: 1.5px dashed rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  color: var(--brand-light);
  cursor: pointer; transition: all 0.2s;
  text-align: center;
}
.create-group-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand);
  opacity: 1 !important;
}

/* Group sidebar */
.sb-group {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer; transition: all 0.2s;
}
.sb-group:hover { background: rgba(251, 191, 36, 0.06); border-color: rgba(251, 191, 36, 0.15); }
.sb-group.active { background: rgba(251, 191, 36, 0.1); border-color: var(--accent-gold); }
.sb-group.active::before {
  content: ''; position: absolute; left: -3px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 2px;
  background: var(--accent-gold);
}
.sb-group .sg-avatars { display: flex; flex-shrink: 0; }
.sb-group .sg-avatar {
  width: 28px; height: 28px;
  background: rgba(14, 12, 28, 0.6);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  image-rendering: pixelated; margin-left: -6px;
}
.sb-group .sg-avatar:first-child { margin-left: 0; }
.sb-group .sg-avatar canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 20px; height: 20px;
}
.sb-group .sg-info { flex: 1; min-width: 0; }
.sb-group .sg-name {
  font-size: 13px; font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.sb-group .sg-badge {
  font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 36, 0.3);
}
.sb-group .sg-desc {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ========= DREAMSCAPE (V1.2) ========= */
.sidebar-label .badge-dot.dream { background: var(--brand-light); }

/* Shared: section count tag (used by Dreamscape sections) */
.auto-section-count {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.sb-dream-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  border: 1.5px solid transparent;
  margin-bottom: 4px;
  transition: all 0.18s;
}
.sb-dream-item:hover {
  background: rgba(129, 140, 248, 0.08);
  border-color: rgba(129, 140, 248, 0.3);
}
.sb-dream-item.active {
  background: rgba(129, 140, 248, 0.12);
  border-color: var(--brand-light);
}
.sb-dream-item .sb-d-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.sb-dream-item .sb-d-body { flex: 1; min-width: 0; }
.sb-dream-item .sb-d-name {
  font-size: 12px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-dream-item .sb-d-meta {
  font-size: 9px; color: var(--text-muted);
  margin-top: 1px;
}

#dreamscape-view {
  flex: 1;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-dark);
}
#dreamscape-view.active { display: flex; }

.dream-topbar {
  display: none;
}
.dream-topbar .dream-title-row {
  display: flex; align-items: center; gap: 9px;
}
.dream-topbar .dream-title-icon {
  width: 30px; height: 30px;
  background: rgba(129, 140, 248, 0.12);
  border: 1.5px solid rgba(129, 140, 248, 0.4);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.dream-topbar .dream-title { font-size: 14px; font-weight: 700; color: #fff; }
.dream-topbar .dream-breadcrumb {
  font-size: 10px; color: var(--text-muted);
  margin-top: 2px;
}
.dream-topbar .dream-l1-tag { color: var(--accent-gold); font-weight: 600; }
.dream-topbar .dream-l2-tag { color: var(--brand-light); font-weight: 600; }

/* ===== Dreamscape Tab Nav ===== */
.dream-tab-nav {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
}
.dream-tab-nav-btn {
  padding: 5px 16px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.dream-tab-nav-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}
.dream-tab-nav-btn.active {
  background: rgba(129, 140, 248, 0.18);
  color: var(--brand-light);
}

.dream-content {
  flex: 1; overflow: auto;
  padding: 16px 18px 24px;
}
.dream-section {
  margin-bottom: 22px;
  scroll-margin-top: 16px;
}
.dream-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.dream-section-title {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--text);
  letter-spacing: 1.5px;
  display: flex; align-items: center; gap: 10px;
}
.dream-section-title .dream-section-bar {
  width: 4px; height: 14px;
  background: var(--accent-pink);
  border-radius: 1px;
}
.dream-section-title.l1 .dream-section-bar { background: var(--accent-gold); }
.dream-section-title.skill .dream-section-bar { background: var(--accent-gold); }
.dream-section-hint {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.3px;
  margin-left: 4px;
  font-family: var(--font-ui);
  text-transform: none;
}

.dream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.dream-card {
  background: rgba(38, 35, 58, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 13px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column; gap: 8px;
}
.dream-card:hover {
  border-color: var(--accent-pink);
  background: rgba(244, 114, 182, 0.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(244, 114, 182, 0.25);
}
.dream-card.skill:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 4px 0 rgba(251, 191, 36, 0.25);
}
.dream-card-head {
  display: flex; align-items: flex-start; gap: 10px;
}
.dream-card-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  border: 1.5px solid;
}
.dream-card-title {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.dream-card-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}
.dream-card-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.dream-mount-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 700;
}
.dream-mount-tag.mounted {
  background: rgba(244, 114, 182, 0.15);
  color: var(--accent-pink);
  border: 1px solid rgba(244, 114, 182, 0.35);
}
.dream-mount-tag.mounted.skill {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  border-color: rgba(251, 191, 36, 0.35);
}
.dream-mount-tag.empty {
  background: rgba(154, 152, 168, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(154, 152, 168, 0.25);
}
.dream-size-tag {
  font-size: 10px;
  color: var(--text-muted);
}
.dream-add-card {
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 14px 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12px;
  transition: all 0.18s;
}
.dream-add-card:hover {
  border-color: var(--brand-light);
  color: var(--brand-light);
  background: rgba(129, 140, 248, 0.04);
}

.dream-wiki-list {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 4px;
}
.dream-wiki-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s;
}
.dream-wiki-row:hover { border-color: var(--accent-gold); background: rgba(251, 191, 36, 0.05); }
.dream-wiki-icon { font-size: 13px; }
.dream-wiki-name {
  flex: 1;
  font-size: 12px; color: var(--text); font-weight: 600;
}
.dream-wiki-size {
  font-size: 10px; color: var(--text-muted);
}

/* ===== 梦/空间 顶部 tabs (V1.2.1) ===== */
.dream-toptabs {
  display: flex; align-items: center; gap: 0;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 18px;
  padding-bottom: 0;
}
.dream-toptab {
  background: transparent;
  border: none;
  padding: 9px 18px 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.16s;
}
.dream-toptab:hover { color: var(--text); }
.dream-toptab.active { color: var(--brand-light); }
.dream-toptab.active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: -1.5px;
  height: 2.5px;
  background: var(--brand-light);
  border-radius: 2px 2px 0 0;
}
.dream-toptab .dt-count {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-muted);
  background: rgba(154, 152, 168, 0.12);
  padding: 2px 5px;
  border-radius: 3px;
  vertical-align: middle;
}
.dream-toptab.active .dt-count {
  color: var(--brand-light);
  background: rgba(129, 140, 248, 0.15);
}
.dream-tab-pane { display: none; }
.dream-tab-pane.active { display: block; }
#dream-pane-inception.active {
  display: block;
  padding: 20px 24px 28px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* ===== 梦 IM 双栏 layout (V1.2.4) — Lark 风 ===== */
.dream-content.im-mode {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#dream-pane-dream.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
/* sub-tabs bar — hidden; topbar dropdown drives 梦/聊天 routing */
.dream-pane-subtabs {
  display: none;
  flex-shrink: 0;
  align-items: center; gap: 0;
  padding: 0 16px;
  border-bottom: 1px solid rgba(154, 152, 168, 0.18);
  background: rgba(20, 18, 32, 0.4);
}
.dream-subpane-chat {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.dream-subpane-chat.active {
  display: flex;
  flex-direction: row;
}
.dream-subpane-manage {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 28px;
}
.dream-subpane-manage.active {
  display: block;
}
.dream-im-list {
  flex-shrink: 0;
  width: 320px;
  border-right: 1px solid var(--border);
  background: rgba(30, 27, 46, 0.4);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.dim-list-head {
  flex-shrink: 0;
  padding: 12px 14px 8px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(154, 152, 168, 0.1);
}
.dim-search {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}
.dim-search:focus { border-color: var(--brand-light); }
.dim-search::placeholder { color: var(--text-muted); }
.dim-add-wrap { position: relative; flex-shrink: 0; }
.dim-add-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(129, 140, 248, 0.1);
  color: var(--brand-light);
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.dim-add-btn:hover {
  background: var(--brand-light);
  color: #1a1830;
  border-color: var(--brand-light);
}
.dim-add-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--bg-card, #2a2640);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 50;
  min-width: 140px;
}
.dim-add-wrap.open .dim-add-menu { display: block; }
.dim-add-menu button {
  display: block; width: 100%;
  background: transparent; border: none;
  padding: 8px 10px;
  text-align: left;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12px;
  border-radius: 5px;
  cursor: pointer;
}
.dim-add-menu button:hover {
  background: rgba(129, 140, 248, 0.12);
  color: var(--brand-light);
}

.dim-list-body {
  flex: 1; overflow-y: auto;
  padding: 4px 0;
}
.dim-list-body::-webkit-scrollbar { width: 6px; }
.dim-list-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.dim-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.12s;
  position: relative;
}
.dim-item:hover { background: rgba(129, 140, 248, 0.06); }
.dim-item.active {
  background: rgba(129, 140, 248, 0.12);
  border-left-color: var(--brand-light);
}
.dim-item-avatar {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1.5px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  background: rgba(38, 35, 58, 0.95);
}
.dim-item-avatar.group {
  background: rgba(129, 140, 248, 0.15);
  border-color: var(--brand-light);
  color: var(--brand-light);
}
.dim-item-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.dim-item-row1 {
  display: flex; align-items: center; gap: 6px;
  overflow: hidden;
}
.dim-item-name {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 700;
  color: #fff;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dim-item-time {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-ui);
}
.dim-item-body {
  font-size: 9.5px;
  color: var(--accent-teal);
  margin-top: 2px;
  font-family: var(--font-ui);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dim-item-body.no-body { color: var(--text-muted); opacity: 0.7; }
.dim-item-role { color: var(--accent-gold); font-weight: 600; }
.dim-item-body.no-body .dim-item-role { color: var(--accent-gold); opacity: 1; }
.dim-item-tag {
  font-size: 8px;
  background: rgba(154, 152, 168, 0.14);
  color: var(--text-muted);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--font-pixel);
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.dim-item-tag.group {
  background: rgba(129, 140, 248, 0.18);
  color: var(--brand-light);
}
.dim-item-tag.draft {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
}
.dim-list-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-ui);
  line-height: 1.6;
}
.dim-list-empty .dle-icon {
  font-size: 28px;
  opacity: 0.4;
  margin-bottom: 8px;
}

.dream-im-main {
  flex: 1;
  display: flex; flex-direction: column;
  background: var(--bg-dark);
  overflow: hidden;
  min-width: 0;
}
.dim-empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-ui);
}
.dim-empty-icon {
  font-size: 56px;
  opacity: 0.3;
  margin-bottom: 16px;
}
.dim-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.dim-empty-hint {
  font-size: 12px;
  line-height: 1.6;
  max-width: 320px;
}

/* ===== Dream welcome overlay ===== */
#dream-welcome-overlay {
  position: absolute; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 14, 23, 0.85);
  backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.4s ease;
}
#dream-welcome-overlay.visible { opacity: 1; }
.dwelcome-card {
  text-align: center; padding: 48px 40px;
  max-width: 420px;
  animation: dwelcome-rise 0.5s ease both;
}
@keyframes dwelcome-rise {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.dwelcome-icon { font-size: 56px; margin-bottom: 20px; }
.dwelcome-title {
  font-size: 22px; font-weight: 700;
  color: var(--text-primary, #e2e0ec);
  margin-bottom: 16px;
  font-family: var(--font-ui);
}
.dwelcome-desc {
  font-size: 14px; line-height: 1.7;
  color: var(--text-dim, #9a98a8);
  margin-bottom: 12px;
}
.dwelcome-hint {
  font-size: 13px; color: var(--accent, #a78bfa);
  margin-bottom: 28px;
}
.dwelcome-btn {
  background: var(--accent, #a78bfa); color: #fff;
  border: none; border-radius: 8px;
  padding: 10px 32px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.dwelcome-btn:hover { background: #8b5cf6; }

/* ===== 梦 sub-tabs (V1.2.2) — 梦 / 群聊 ===== */
.dream-subtabs {
  display: flex; align-items: center; gap: 0;
  border-bottom: 1px dashed rgba(154, 152, 168, 0.22);
  margin-bottom: 14px;
}
.dream-subtab {
  background: transparent;
  border: none;
  padding: 7px 14px 8px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  position: relative;
  transition: color 0.16s;
}
.dream-subtab:hover { color: var(--text); }
.dream-subtab.active { color: var(--brand-light); }
.dream-subtab.active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2px;
  background: var(--brand-light);
  border-radius: 2px 2px 0 0;
}
.dream-subtab .dt-count {
  display: inline-block;
  margin-left: 5px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-muted);
  background: rgba(154, 152, 168, 0.12);
  padding: 2px 5px;
  border-radius: 3px;
  vertical-align: middle;
}
.dream-subtab.active .dt-count {
  color: var(--brand-light);
  background: rgba(129, 140, 248, 0.15);
}
.dream-subpane { display: none; }
.dream-subpane.active { display: block; }
.dream-subtabs .dream-section-cta { margin-left: auto; }

/* ===== 群聊 grid ===== */
.dream-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.dream-group-card {
  background: rgba(38, 35, 58, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column;
  gap: 10px;
  position: relative;
}
.dream-group-card:hover {
  border-color: var(--brand-light);
  background: rgba(129, 140, 248, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(129, 140, 248, 0.22);
}
.dgc-head { display: flex; align-items: center; gap: 10px; }
.dgc-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(129, 140, 248, 0.15);
  border: 1.5px solid var(--brand-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.dgc-name {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.dgc-meta {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  margin-top: 3px;
  line-height: 1.3;
}
.dgc-members {
  display: flex; align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 0 2px;
}
.dgc-member-av {
  position: relative;
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1.5px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  background: rgba(38, 35, 58, 0.95);
  flex-shrink: 0;
}
.dgc-member-av.tl::after {
  content: 'TL';
  position: absolute;
  bottom: -5px; right: -6px;
  font-size: 7px;
  font-weight: 800;
  color: #1a1830;
  background: var(--brand-light);
  padding: 1px 3px;
  border-radius: 3px;
  font-family: var(--font-ui);
  line-height: 1;
  letter-spacing: 0.3px;
}
.dgc-member-more {
  width: 26px; height: 26px;
  border-radius: 7px;
  border: 1.5px solid rgba(154, 152, 168, 0.4);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-ui);
  background: rgba(38, 35, 58, 0.95);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dgc-last {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: var(--font-ui);
  line-height: 1.4;
  padding-top: 8px;
  border-top: 1px dashed rgba(154, 152, 168, 0.18);
  display: flex; align-items: center; gap: 5px;
  overflow: hidden;
}
.dgc-last > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dgc-last b { color: var(--text); font-weight: 700; }
.dgc-last.empty { color: var(--text-muted); opacity: 0.7; }
.dream-groups-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 44px 24px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: var(--font-ui);
  border: 1.5px dashed rgba(154, 152, 168, 0.22);
  border-radius: 14px;
  background: rgba(38, 35, 58, 0.3);
}
.dgg-empty-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.5; }
.dgg-empty-title { font-weight: 700; color: var(--text); margin-bottom: 6px; font-size: 14px; }
.dgg-empty-hint { line-height: 1.6; margin-bottom: 16px; }

/* ===== 梦 tab — agent grid ===== */
.dream-agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.dream-agent-card {
  background: rgba(38, 35, 58, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.dream-agent-card:hover {
  border-color: var(--brand-light);
  background: rgba(129, 140, 248, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(129, 140, 248, 0.12);
}
.dream-agent-header {
  display: flex; align-items: center; gap: 12px;
}
.dream-agent-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1.5px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: rgba(38, 35, 58, 0.95);
}
.dream-agent-info { flex: 1; min-width: 0; }
.dream-agent-role {
  font-size: 11px; font-weight: 600;
  color: var(--brand-light);
  margin-top: 1px;
}
.dream-agent-name {
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.dream-agent-tagline {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.dream-agent-meta {
  display: flex; flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}
.dream-agent-meta-sep { display: none; }
.dream-agent-chat-row,
.dream-agent-body-row {
  display: flex; align-items: center;
  gap: 4px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-muted);
  font-family: var(--font-ui);
  white-space: nowrap;
}
.dream-agent-chat-row .dac-icon,
.dream-agent-body-row .dab-icon {
  font-size: 10px;
  flex-shrink: 0;
}
.dream-agent-meta-sep {
  width: 1px; height: 12px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.dream-agent-chat-row.has-recent {
  color: var(--text-dim);
}
.dream-agent-body-row.has-body {
  color: var(--accent-teal);
}
.dream-agent-body-row.has-body .dab-bot {
  color: #fff;
  font-weight: 700;
}
.dream-agent-body-row.no-body {
  color: var(--text-muted);
  opacity: 0.75;
}
.dream-agent-edit-pencil { display: none; }
.dream-section-cta {
  background: var(--brand-light);
  color: #1a1830;
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-ui);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(70, 80, 180, 0.45);
  transition: all 0.16s;
  margin-left: 12px;
}
.dream-section-cta:hover { transform: translateY(-1px); }
.dream-section-cta:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(70, 80, 180, 0.45); }
.dream-agent-foot {
  display: flex;
  gap: 8px;
  width: 100%;
}
.dream-agent-chat {
  flex: 1;
  background: var(--accent-teal);
  color: #062722;
  border: none;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.16s;
}
.dream-agent-chat:hover { filter: brightness(1.1); }
.dream-agent-mount {
  flex: 1;
  background: rgba(129, 140, 248, 0.12);
  color: var(--brand-light);
  border: 1px solid rgba(129, 140, 248, 0.3);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.16s;
}
.dream-agent-mount:hover { border-color: var(--brand-light); background: rgba(129, 140, 248, 0.2); }
.dream-agent-mount.mounted {
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent-teal);
  border-color: rgba(45, 212, 191, 0.3);
}
.dream-agent-team { display: none; }
.dream-agent-status {
  position: absolute;
  top: 10px; right: 10px;
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(45, 212, 191, 0.15);
  color: var(--accent-teal);
  border: 1px solid rgba(45, 212, 191, 0.4);
}
.dream-agent-status.draft {
  background: rgba(154, 152, 168, 0.12);
  color: var(--text-muted);
  border-color: rgba(154, 152, 168, 0.3);
}
.dream-agent-add {
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 16px 14px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12px;
  transition: all 0.18s;
  min-height: 188px;
}
.dream-agent-add:hover {
  border-color: var(--brand-light);
  color: var(--brand-light);
  background: rgba(129, 140, 248, 0.04);
}
.dream-agent-add .daa-plus {
  font-size: 28px;
  width: 56px; height: 56px;
  border: 1.5px dashed currentColor;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.dream-agent-add .daa-label { font-weight: 700; font-size: 13px; }
.dream-agent-add .daa-hint { font-size: 10px; opacity: 0.7; }

/* ===== 梦 编辑器 (drawer) ===== */
#dream-editor {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 22, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 200;
}
#dream-editor.active { display: flex; }
.dream-editor-shell {
  margin: auto;
  width: min(1100px, 95vw);
  height: min(720px, 92vh);
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.dream-editor-side {
  width: 200px;
  flex-shrink: 0;
  background: rgba(30, 27, 46, 0.95);
  border-right: 1.5px solid var(--border);
  display: flex; flex-direction: column;
  padding: 16px 10px;
  gap: 4px;
}
.dream-editor-side .des-head {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px 14px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 8px;
}
.dream-editor-side .des-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1.5px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.dream-editor-side .des-name {
  font-size: 13px; font-weight: 700; color: #fff;
  line-height: 1.2;
}
.dream-editor-side .des-meta {
  font-size: 9px; color: var(--text-muted);
  margin-top: 2px;
}
.dream-editor-tab {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.14s;
}
.dream-editor-tab:hover {
  background: rgba(129, 140, 248, 0.06);
  color: var(--text);
}
.dream-editor-tab.active {
  background: rgba(129, 140, 248, 0.15);
  color: var(--brand-light);
  box-shadow: inset 2px 0 0 var(--brand-light);
}
.dream-editor-tab .det-icon { font-size: 14px; width: 16px; text-align: center; }
.dream-editor-side .des-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
.dream-editor-side .des-save {
  background: var(--brand-light);
  color: #1a1830;
  border: none;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: 12px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(70, 80, 180, 0.45);
}
.dream-editor-side .des-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 11px;
  cursor: pointer;
}
.dream-editor-side .des-delete {
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 11px;
  cursor: pointer;
  margin-top: 4px;
}
.dream-editor-side .des-delete:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border-color: #f87171;
}
.dream-editor-main {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.dream-editor-topbar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.dream-editor-topbar .det-title {
  font-size: 14px; font-weight: 700; color: #fff;
}
.dream-editor-topbar .det-sub {
  font-size: 10px; color: var(--text-muted);
  margin-top: 2px;
}
.dream-editor-close {
  background: rgba(154, 152, 168, 0.1);
  border: none;
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.dream-editor-close:hover { background: rgba(244, 114, 182, 0.15); color: var(--accent-pink); }
.dream-editor-body {
  flex: 1;
  overflow: auto;
  padding: 18px 22px 24px;
}
.dee-pane { display: none; }
.dee-pane.active { display: block; }

/* identity pane */
.dee-row {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 22px;
  align-items: flex-start;
}
.dee-form {
  display: flex; flex-direction: column;
  gap: 16px;
}
.dee-field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.dee-field-label .dee-required { color: var(--accent-pink); margin-left: 3px; }
.dee-input,
.dee-textarea {
  width: 100%;
  background: rgba(30, 27, 46, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 8px 10px;
  box-sizing: border-box;
  transition: border-color 0.14s;
}
.dee-input:focus,
.dee-textarea:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}
.dee-textarea { min-height: 70px; resize: vertical; }
.dee-field {
  display: flex; flex-direction: column; gap: 6px;
}
.dee-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}
.dee-code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
  min-height: 120px;
  background: rgba(16, 14, 28, 0.8);
  border-color: rgba(255,255,255,0.08);
  tab-size: 2;
}
.dee-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}
.dee-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 14px;
  color: var(--brand-light);
  font-size: 11px;
  font-weight: 600;
}
.dee-tag-x {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}
.dee-tag-x:hover { color: var(--accent-pink); }
.dee-file-item {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(30, 27, 46, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.dee-file-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.dee-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.dee-chip {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(30, 27, 46, 0.5);
  color: var(--text-dim);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.14s;
}
.dee-chip:hover { border-color: var(--brand-light); color: var(--text); }
.dee-chip.active {
  background: rgba(129, 140, 248, 0.18);
  border-color: var(--brand-light);
  color: var(--brand-light);
  font-weight: 700;
}
.dee-avatar-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.dee-avatar-cell {
  aspect-ratio: 1;
  background: rgba(38, 35, 58, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.14s;
}
.dee-avatar-cell:hover { border-color: var(--brand-light); }
.dee-avatar-cell.active {
  border-color: var(--brand-light);
  background: rgba(129, 140, 248, 0.15);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.25);
}
.dee-avatar-upload {
  aspect-ratio: 1;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: transparent;
}
.dee-avatar-upload:hover { border-color: var(--brand-light); color: var(--brand-light); }

.dee-preview {
  position: sticky;
  top: 0;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 14px 14px;
  text-align: center;
}
.dee-preview .dpv-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.dee-preview .dpv-avatar {
  width: 70px; height: 70px;
  border-radius: 16px;
  border: 2px solid var(--brand-light);
  background: rgba(129, 140, 248, 0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 10px;
}
.dee-preview .dpv-name {
  font-size: 16px; font-weight: 800; color: #fff;
  margin-bottom: 4px;
}
.dee-preview .dpv-tagline {
  font-size: 11px; color: var(--text-dim);
  line-height: 1.5;
  min-height: 32px;
}
.dee-preview .dpv-style-row {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
  margin-top: 10px;
}
.dee-preview .dpv-style-tag {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 9px;
  background: rgba(129, 140, 248, 0.12);
  color: var(--brand-light);
  border: 1px solid rgba(129, 140, 248, 0.3);
}

/* ===== Resume pane (former identity, v0.7.3) ===== */
.dee-resume-form { gap: 22px; }
.dee-section {
  background: rgba(30, 27, 46, 0.45);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 16px;
}
.dee-section-title {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12px; font-weight: 800; color: var(--text);
  letter-spacing: 0.3px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(129, 140, 248, 0.2);
}
.dee-section-title .dst-hint {
  font-size: 10px; font-weight: 500; color: var(--text-muted);
  letter-spacing: 0;
}
.dee-section-body {
  display: flex; flex-direction: column;
  gap: 12px;
}
.dee-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dee-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23818cf8' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}
.dee-bullet-list {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}
.dee-bullet-row {
  display: flex; align-items: center; gap: 6px;
}
.dee-bullet-row .dee-bullet-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-light);
  flex-shrink: 0;
}
.dee-bullet-row .dee-input { flex: 1; }
.dee-bullet-row .dee-bullet-del {
  background: transparent;
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: var(--accent-pink);
  width: 26px; height: 26px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}
.dee-bullet-row .dee-bullet-del:hover { background: rgba(244, 114, 182, 0.12); }
.dee-bullet-add {
  align-self: flex-start;
  background: transparent;
  border: 1px dashed rgba(129, 140, 248, 0.4);
  color: var(--brand-light);
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  font-family: var(--font-ui);
}
.dee-bullet-add:hover {
  background: rgba(129, 140, 248, 0.1);
  border-color: var(--brand-light);
  border-style: solid;
}
.dee-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.dee-meta-cell {
  background: rgba(38, 35, 58, 0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.dee-meta-cell .dmc-label {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.dee-meta-cell .dmc-val {
  font-size: 12px; font-weight: 700; color: var(--text);
}

/* Upgraded preview card (协作名片) */
.dee-preview.dee-preview-resume {
  text-align: left;
  padding: 14px 14px 14px;
}
.dee-preview.dee-preview-resume .dpv-label { text-align: center; }
.dee-preview.dee-preview-resume .dpv-avatar { margin: 0 auto 8px; }
.dee-preview.dee-preview-resume .dpv-name {
  text-align: center;
  margin-bottom: 2px;
}
.dee-preview .dpv-role {
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 1.2px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}
.dee-preview.dee-preview-resume .dpv-tagline {
  text-align: center;
  margin-bottom: 8px;
  min-height: 0;
}
.dee-preview.dee-preview-resume .dpv-style-row { justify-content: center; margin-bottom: 12px; }
.dpv-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(129, 140, 248, 0.18);
}
.dpv-section .dpv-st {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.dpv-section.dpv-section-warn .dpv-st { color: var(--accent-pink); }
.dpv-tag-row {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.dpv-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent-teal);
  border: 1px solid rgba(45, 212, 191, 0.3);
}
.dpv-tag.dpv-tag-out {
  background: rgba(251, 191, 36, 0.08);
  color: var(--accent-gold);
  border-color: rgba(251, 191, 36, 0.3);
}
.dpv-text {
  font-size: 10.5px;
  color: var(--text-dim);
  line-height: 1.55;
}
.dpv-meta-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 9.5px;
  color: var(--text-muted);
}

/* tools pane */
.dee-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.dee-tool-card {
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 13px;
  transition: all 0.14s;
  cursor: pointer;
}
.dee-tool-card:hover { border-color: var(--brand-light); }
.dee-tool-card.on {
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.05);
}
.dee-tool-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.dee-tool-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.dee-tool-icon { font-size: 16px; }
.dee-tool-desc {
  font-size: 11px; color: var(--text-dim);
  line-height: 1.5;
}
.dee-toggle {
  width: 34px; height: 18px;
  background: rgba(154, 152, 168, 0.2);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background 0.16s;
  flex-shrink: 0;
}
.dee-toggle::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.16s;
}
.dee-toggle.on { background: var(--accent-teal); }
.dee-toggle.on::after { left: 18px; }

/* skills pane */
.dee-skill-actions {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.dee-skill-search {
  flex: 1;
  background: rgba(30, 27, 46, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 12px;
  font-family: var(--font-ui);
}
.dee-skill-upload {
  background: var(--accent-gold);
  color: #2a1f00;
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 11px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(180, 130, 20, 0.45);
}
.dee-skill-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (max-width: 480px) { .dee-skill-list { grid-template-columns: 1fr; } }

/* Grid skill card */
.dee-skill-card {
  display: flex; flex-direction: column;
  padding: 14px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.dee-skill-card:hover { border-color: rgba(129, 140, 248, 0.4); transform: translateY(-1px); }
.dee-skill-card.installed { border-color: rgba(45, 212, 191, 0.2); }
.dee-sc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dee-sc-icon { font-size: 26px; }
.dee-sc-name { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.dee-sc-desc { font-size: 11px; color: var(--text-dim); line-height: 1.5; margin-bottom: 8px; }
.dee-sc-caps { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.dee-sc-example {
  padding: 6px 8px; border-radius: 6px; margin-bottom: 8px;
  background: rgba(45, 212, 191, 0.04); border: 1px solid rgba(45, 212, 191, 0.1);
}
.dee-sc-ex-text { font-size: 10px; color: var(--text-dim); line-height: 1.5; margin-top: 3px; }
.dee-sc-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 6px;
}

/* Legacy row styles kept for uploaded/custom skills */
.dee-skill-row {
  display: flex; flex-direction: column;
  padding: 9px 12px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 8px;
}
.dee-skill-row:hover { border-color: rgba(129, 140, 248, 0.4); }
.dee-skill-row-main {
  display: flex; align-items: center; gap: 12px;
}
.dee-skill-icon { font-size: 16px; width: 22px; text-align: center; }
.dee-skill-info { flex: 1; min-width: 0; }
.dee-skill-name {
  font-size: 12px; font-weight: 700; color: var(--text);
}
.dee-skill-desc {
  font-size: 10px; color: var(--text-muted);
  margin-top: 2px;
}
.dee-skill-trigger-row {
  margin-top: 4px;
  display: flex; gap: 4px; flex-wrap: wrap;
}
.dee-sk-trigger-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.dee-sk-trigger-badge.keyword {
  background: rgba(129, 140, 248, 0.12);
  color: var(--brand-light);
  border: 1px solid rgba(129, 140, 248, 0.25);
}
.dee-sk-trigger-badge.always {
  background: rgba(154, 152, 168, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(154, 152, 168, 0.2);
}
.dee-sk-params {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(20, 18, 32, 0.4);
  border-radius: 6px;
  border: 1px solid rgba(129, 140, 248, 0.1);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.dee-sk-param-row {
  display: flex; align-items: center; gap: 6px;
}
.dee-sk-param-label {
  font-size: 10px; color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}
.dee-sk-param-select, .dee-sk-param-input {
  background: rgba(38, 35, 58, 0.6);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 11px;
  min-width: 80px;
}
.dee-sk-param-select:focus, .dee-sk-param-input:focus {
  outline: none; border-color: var(--brand-light);
}
.dee-skill-cat {
  font-family: var(--font-pixel);
  font-size: 7px;
  letter-spacing: 0.5px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(129, 140, 248, 0.12);
  color: var(--brand-light);
  border: 1px solid rgba(129, 140, 248, 0.3);
}
.dee-skill-del {
  background: transparent;
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: var(--accent-pink);
  width: 24px; height: 24px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}
.dee-skill-toggle {
  width: 28px; height: 28px;
  border-radius: 8px;
  font-size: 16px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: none;
  transition: all 0.15s;
  flex-shrink: 0;
}
.dee-skill-toggle.add {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(45, 212, 191, 0.25));
  color: var(--accent-teal);
  box-shadow: 0 2px 6px rgba(45, 212, 191, 0.15);
}
.dee-skill-toggle.add:hover {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.25), rgba(45, 212, 191, 0.4));
  box-shadow: 0 3px 10px rgba(45, 212, 191, 0.3);
  transform: translateY(-1px);
}
.dee-skill-toggle.remove {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(244, 114, 182, 0.22));
  color: var(--accent-pink);
  box-shadow: 0 2px 6px rgba(244, 114, 182, 0.12);
}
.dee-skill-toggle.remove:hover {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.22), rgba(239, 68, 68, 0.35));
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}
.dee-skill-del:hover { background: rgba(244, 114, 182, 0.12); }

/* Skill intro */
.dee-skill-intro {
  margin-bottom: 12px; color: var(--text-dim); font-size: 11px; line-height: 1.7;
}
.dee-skill-intro strong { color: var(--text); }

/* Skill category tabs */
.dee-skill-tabs {
  display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap;
}
.dee-skill-tab {
  background: rgba(38, 35, 58, 0.5); border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 12px; font-size: 11px; color: var(--text-muted); cursor: pointer;
  font-family: var(--font-ui); transition: all 0.15s;
}
.dee-skill-tab:hover { border-color: rgba(129, 140, 248, 0.4); color: var(--text); }
.dee-skill-tab.active {
  background: rgba(129, 140, 248, 0.2); border-color: var(--brand-light); color: var(--brand-light); font-weight: 700;
}

/* Skill bundles */
.dee-skill-bundles { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dee-skill-bundle {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: linear-gradient(135deg, rgba(129, 140, 248, 0.06), rgba(45, 212, 191, 0.06));
  border: 1px dashed rgba(129, 140, 248, 0.3); border-radius: 8px;
}
.dee-bundle-icon { font-size: 18px; }
.dee-bundle-info { flex: 1; min-width: 0; }
.dee-bundle-name { font-size: 12px; font-weight: 700; color: var(--text); }
.dee-bundle-desc { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.dee-bundle-install {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(129, 140, 248, 0.35));
  border: none; color: var(--brand-light); padding: 5px 12px; border-radius: 6px;
  font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.dee-bundle-install:hover { background: rgba(129, 140, 248, 0.4); }

/* Bundle detail modal skill list */
.dee-bd-skill-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dee-bd-skill-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  background: rgba(38, 35, 58, 0.5); border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.dee-bd-skill-item:hover { border-color: rgba(129, 140, 248, 0.4); }
.dee-bd-skill-item.installed { opacity: 0.65; }
.dee-bd-skill-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.dee-bd-skill-info { flex: 1; min-width: 0; }
.dee-bd-skill-name { font-size: 12px; font-weight: 700; color: var(--text); }
.dee-bd-skill-desc { font-size: 10px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.dee-bd-installed-tag {
  font-size: 9px; font-weight: 600; color: var(--accent-teal); margin-left: 6px;
  padding: 1px 6px; border-radius: 3px; background: rgba(45, 212, 191, 0.1);
}

.dee-skill-caps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.dee-skill-cap {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  background: rgba(129, 140, 248, 0.08); color: var(--brand-light);
  border: 1px solid rgba(129, 140, 248, 0.15);
}
.dee-skill-example {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; padding: 6px 8px; border-radius: 6px;
  background: rgba(45, 212, 191, 0.05); border: 1px solid rgba(45, 212, 191, 0.12);
  font-size: 10px; color: var(--text-dim); line-height: 1.5;
}
.dee-skill-ex-label {
  font-size: 9px; font-weight: 700; color: var(--accent-teal);
  padding: 1px 5px; border-radius: 3px;
  background: rgba(45, 212, 191, 0.1);
}
.dee-skill-ex-input { color: var(--text); font-weight: 600; }
.dee-skill-ex-arrow { color: var(--text-muted); }
.dee-skill-ex-output { color: var(--text-dim); }
.dee-skill-footer, .dee-skill-footer-right {
  display: flex; align-items: center; gap: 8px;
}
.dee-skill-rating {
  font-size: 10px; font-weight: 700; color: var(--accent-gold);
}
.dee-skill-detail-btn {
  background: none; border: 1px solid rgba(129, 140, 248, 0.3); color: var(--brand-light);
  padding: 2px 10px; border-radius: 4px; font-size: 10px; cursor: pointer;
  font-family: var(--font-ui);
}
.dee-skill-detail-btn:hover { background: rgba(129, 140, 248, 0.12); border-color: var(--brand-light); }

/* Skill detail modal */
.dee-skill-detail-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.65); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dee-skill-detail-modal {
  background: var(--bg-card, #1e1b2e); border: 1.5px solid var(--border);
  border-radius: 14px; width: 90vw; max-width: 720px; max-height: 85vh;
  overflow-y: auto; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.dee-sd-close {
  position: absolute; top: 12px; right: 14px; background: none; border: none;
  color: var(--text-muted); font-size: 20px; cursor: pointer; z-index: 1;
}
.dee-sd-close:hover { color: var(--text); }
.dee-sd-body {
  display: flex; gap: 20px; padding: 24px 24px 16px;
}
@media (max-width: 600px) {
  .dee-sd-body { flex-direction: column; gap: 16px; padding: 20px 16px 12px; }
}
.dee-sd-left, .dee-sd-right { flex: 1; min-width: 0; }
.dee-sd-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.dee-sd-icon { font-size: 28px; }
.dee-sd-name { font-size: 16px; font-weight: 800; color: var(--text); }
.dee-sd-cat-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.dee-sd-desc { font-size: 12px; color: var(--text-dim); line-height: 1.7; margin-bottom: 14px; }
.dee-sd-section { margin-bottom: 12px; }
.dee-sd-label { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.5px; margin-bottom: 6px; text-transform: uppercase; }
.dee-sd-caps { display: flex; flex-wrap: wrap; gap: 4px; }
.dee-sd-cap {
  font-size: 10px; padding: 3px 10px; border-radius: 5px;
  background: rgba(129, 140, 248, 0.1); color: var(--brand-light);
  border: 1px solid rgba(129, 140, 248, 0.2);
}
.dee-sd-list { list-style: none; padding: 0; margin: 0; }
.dee-sd-list li { font-size: 11px; color: var(--text-dim); padding: 2px 0; padding-left: 16px; position: relative; }
.dee-sd-list.ok li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-teal); font-weight: 700; }
.dee-sd-list.no li::before { content: '✗'; position: absolute; left: 0; color: var(--accent-pink); font-weight: 700; }

/* Before/After compare */
.dee-sd-compare { display: flex; flex-direction: column; gap: 8px; }
.dee-sd-compare-block {
  padding: 10px 12px; border-radius: 8px; font-size: 11px; line-height: 1.6; color: var(--text-dim);
}
.dee-sd-compare-block.before {
  background: rgba(244, 114, 182, 0.04); border: 1px solid rgba(244, 114, 182, 0.15);
}
.dee-sd-compare-block.after {
  background: rgba(45, 212, 191, 0.04); border: 1px solid rgba(45, 212, 191, 0.15);
}
.dee-sd-compare-tag {
  font-size: 9px; font-weight: 700; margin-bottom: 6px; letter-spacing: 0.5px;
}
.dee-sd-compare-block.before .dee-sd-compare-tag { color: var(--accent-pink); }
.dee-sd-compare-block.after .dee-sd-compare-tag { color: var(--accent-teal); }
.dee-sd-compare-content { white-space: pre-wrap; }
.dee-sd-example-box { margin-top: 12px; }
.dee-sd-example-row { font-size: 11px; color: var(--text-dim); padding: 2px 0; }

/* Detail modal footer */
.dee-sd-footer {
  padding: 12px 24px 20px; display: flex; justify-content: flex-end;
}
.dee-sd-action {
  padding: 8px 24px; border-radius: 8px; font-size: 13px; font-weight: 700;
  cursor: pointer; border: none; transition: all 0.15s;
}
.dee-sd-action.install {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(45, 212, 191, 0.4));
  color: var(--accent-teal);
  box-shadow: 0 3px 10px rgba(45, 212, 191, 0.2);
}
.dee-sd-action.install:hover { background: rgba(45, 212, 191, 0.5); transform: translateY(-1px); }
.dee-sd-action.remove {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.15), rgba(244, 114, 182, 0.3));
  color: var(--accent-pink);
}
.dee-sd-action.remove:hover { background: rgba(244, 114, 182, 0.4); transform: translateY(-1px); }

/* Skill upload form */
.dee-sup-form {
  margin: 10px 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.dee-sup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(129, 140, 248, 0.06);
}
.dee-sup-icon { font-size: 16px; }
.dee-sup-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.dee-sup-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 16px; cursor: pointer; padding: 2px 6px;
  border-radius: 4px;
}
.dee-sup-close:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.dee-sup-body { padding: 14px; }
.dee-sup-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}
.dee-sup-input {
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}
.dee-sup-input:focus { border-color: var(--primary); }
.dee-sup-dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dee-sup-dropzone:hover,
.dee-sup-dropzone.dragover {
  border-color: var(--primary);
  background: rgba(129, 140, 248, 0.06);
}
.dee-sup-file-input {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
}
.dee-sup-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.dee-sup-drop-icon { font-size: 24px; margin-bottom: 4px; }
.dee-sup-drop-text { font-size: 12px; color: var(--text-primary); }
.dee-sup-drop-hint { font-size: 10px; color: var(--text-muted); }
.dee-sup-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 8px;
}
.dee-sup-file-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dee-sup-file-size { font-size: 11px; color: var(--text-muted); }
.dee-sup-file-clear {
  background: none; border: none;
  color: var(--text-muted); font-size: 14px; cursor: pointer;
  padding: 2px 4px; border-radius: 4px;
}
.dee-sup-file-clear:hover { color: #f472b6; }
.dee-sup-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}
.dee-sup-btn {
  padding: 7px 20px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.dee-sup-btn.primary {
  background: var(--accent-teal);
  color: #000;
}
.dee-sup-btn.primary:hover { opacity: 0.85; }
.dee-sup-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* core files pane */
.dee-files-tabs {
  display: flex; gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  flex-wrap: wrap;
}
.dee-file-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--text-muted);
  padding: 7px 12px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px 6px 0 0;
  margin-bottom: -1px;
}
.dee-file-tab:hover { color: var(--text); }
.dee-file-tab.active {
  color: var(--accent-gold);
  border-color: var(--border);
  background: rgba(38, 35, 58, 0.6);
  border-bottom: 1px solid var(--bg-dark);
}
.dee-file-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
  font-size: 10px; color: var(--text-muted);
}
.dee-file-meta .dfm-tag {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.dee-file-content {
  background: #0e0c1d;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: #d8d6e8;
  white-space: pre-wrap;
  max-height: 420px;
  overflow: auto;
}
.dee-file-content .dfc-h { color: #c4b5fd; font-weight: 700; }
.dee-file-content .dfc-c { color: #6b7280; font-style: italic; }
.dee-file-editor {
  background: #0e0c1d;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: #d8d6e8;
  white-space: pre-wrap;
  width: 100%;
  min-height: 320px;
  max-height: 420px;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
}
.dee-file-editor:focus { border-color: var(--primary); }
.dee-file-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 0 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.dee-file-actions .dfm-btn.primary {
  padding: 6px 18px;
  font-size: 11px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-light), var(--accent-pink));
  border: none;
  box-shadow: 0 2px 8px rgba(129, 140, 248, 0.25);
  transition: all 0.18s;
}
.dee-file-actions .dfm-btn.primary:hover {
  box-shadow: 0 4px 16px rgba(129, 140, 248, 0.4);
  transform: translateY(-1px);
}

/* ===== Core file versioning (v0.7.4) ===== */
.dee-file-meta { flex-wrap: wrap; }
.dee-file-meta .dfm-spacer { flex: 1; }
.dee-file-meta .dfm-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 7px;
  font-family: var(--font-ui);
  font-size: 10px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.dee-file-meta .dfm-btn:hover { color: var(--text); border-color: var(--brand-light); background: rgba(129, 140, 248, 0.08); }
.dee-file-meta .dfm-btn.primary {
  color: #fff;
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(129, 140, 248, 0.15);
}
.dee-file-meta .dfm-btn.primary:hover { background: rgba(129, 140, 248, 0.28); border-color: var(--brand-light); }
.dee-file-meta .dfm-vtag {
  color: var(--brand-light);
  font-weight: 700;
}

/* version panel */
.dee-vp-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px;
  margin-top: 8px;
}
.dee-vp-timeline {
  background: rgba(38, 35, 58, 0.4);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  max-height: 460px;
  overflow: auto;
}
.dee-vp-tl-head {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  padding: 4px 6px 8px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 6px;
}
.dee-vp-item {
  position: relative;
  padding: 8px 10px 8px 18px;
  border-radius: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.12s;
  border: 1px solid transparent;
}
.dee-vp-item:hover { background: rgba(129, 140, 248, 0.08); }
.dee-vp-item.selected { background: rgba(129, 140, 248, 0.16); border-color: rgba(129, 140, 248, 0.45); }
.dee-vp-item.current::before {
  content: '';
  position: absolute; left: 6px; top: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 6px var(--accent-gold);
}
.dee-vp-item:not(.current)::before {
  content: '';
  position: absolute; left: 8px; top: 14px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}
.dee-vp-row1 {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.dee-vp-vnum { color: var(--brand-light); }
.dee-vp-item.current .dee-vp-vnum { color: var(--accent-gold); }
.dee-vp-cur-tag {
  font-family: var(--font-pixel);
  font-size: 7px;
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.dee-vp-msg {
  font-size: 11px;
  color: #d8d6e8;
  line-height: 1.4;
  margin-bottom: 3px;
}
.dee-vp-meta {
  font-size: 9.5px;
  color: var(--text-muted);
  display: flex; gap: 6px; flex-wrap: wrap;
}
.dee-vp-meta .dvp-delta { color: var(--accent-gold); }
.dee-vp-preview {
  background: #0e0c1d;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  display: flex; flex-direction: column;
  max-height: 460px;
  overflow: hidden;
}
.dee-vp-pv-head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(38, 35, 58, 0.5);
  font-size: 10.5px;
  flex-wrap: wrap;
}
.dee-vp-pv-title { color: var(--text); font-weight: 700; }
.dee-vp-pv-spacer { flex: 1; }
.dee-vp-pv-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 5px;
  font-family: var(--font-ui);
  font-size: 9.5px; font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}
.dee-vp-pv-btn:hover { color: var(--text); border-color: var(--brand-light); }
.dee-vp-pv-btn.active {
  color: var(--brand-light);
  border-color: var(--brand-light);
  background: rgba(129, 140, 248, 0.1);
}
.dee-vp-pv-btn.danger {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
  padding: 4px 12px;
  border-radius: 7px;
}
.dee-vp-pv-btn.danger:hover { box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4); transform: translateY(-1px); }
.dee-vp-pv-body {
  flex: 1;
  overflow: auto;
  padding: 14px 16px;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: #d8d6e8;
  white-space: pre-wrap;
}
.dee-vp-pv-body .dfc-h { color: #c4b5fd; font-weight: 700; }
.dee-vp-pv-body .dfc-c { color: #6b7280; font-style: italic; }
.dee-vp-pv-empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 32px 12px;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 11px;
}
/* diff lines */
.dvd-line { display: block; padding: 0 10px; margin: 0 -16px; min-height: 20px; }
.dvd-line.add { background: rgba(34, 197, 94, 0.12); color: #86efac; border-left: 2px solid #22c55e; padding-left: 8px; }
.dvd-line.del { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-left: 2px solid #ef4444; padding-left: 8px; text-decoration: line-through; text-decoration-color: rgba(239, 68, 68, 0.6); }
.dvd-line.eq  { color: #6b7280; padding-left: 10px; }
.dvd-line .dvd-mark { display: inline-block; width: 12px; color: inherit; opacity: 0.7; }

/* save modal */
.dee-vp-save-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
}
.dee-vp-save-modal.active { display: flex; }

/* Custom confirm modal */
.dee-confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
}
.dee-confirm-overlay.active { display: flex; }
.dee-confirm-box {
  width: min(380px, 88vw);
  background: #1a1830;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.dee-confirm-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.dee-confirm-msg {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
}
.dee-confirm-detail {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.dee-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.dee-confirm-btn {
  padding: 7px 20px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.dee-confirm-btn.cancel {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.dee-confirm-btn.cancel:hover { background: rgba(255,255,255,0.1); color: var(--text); }
.dee-confirm-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.dee-confirm-btn.primary:hover { box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4); transform: translateY(-1px); }

.dee-vp-save-box {
  width: min(440px, 92vw);
  background: #1a1830;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.dee-vp-save-title {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--accent-gold);
  margin-bottom: 12px;
  letter-spacing: 0.6px;
}
.dee-vp-save-hint {
  font-size: 11px; color: var(--text-muted);
  margin-bottom: 8px;
}
.dee-vp-save-input {
  width: 100%;
  background: #0e0c1d;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12px;
  margin-bottom: 14px;
  box-sizing: border-box;
}
.dee-vp-save-input:focus { outline: none; border-color: var(--brand-light); }
.dee-vp-save-actions {
  display: flex; gap: 8px; justify-content: flex-end;
}
.dee-vp-save-actions .dvsa-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}
.dee-vp-save-actions .dvsa-btn:hover { color: var(--text); border-color: var(--brand-light); }
.dee-vp-save-actions .dvsa-btn.primary {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #1a1830;
}
.dee-vp-save-actions .dvsa-btn.primary:hover { filter: brightness(1.1); }

/* ===== 盗 tab — Inception template marketplace (v0.7.4) ===== */
.inception-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.inception-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 320px;
}
.inception-search-wrap .incs-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px;
  pointer-events: none;
  opacity: 0.55;
}
.inception-search {
  width: 100%;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px 8px 30px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12px;
  box-sizing: border-box;
  transition: border-color 0.14s;
}
.inception-search:focus { outline: none; border-color: var(--brand-light); }
.inception-filters {
  display: flex; gap: 4px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.incf-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 5px;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: all 0.14s;
  display: inline-flex; align-items: center; gap: 5px;
}
.incf-btn:hover { color: var(--text); }
.incf-btn.active {
  background: rgba(129, 140, 248, 0.15);
  color: var(--brand-light);
}
.incf-cnt {
  font-family: var(--font-pixel);
  font-size: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}
.incf-btn.active .incf-cnt {
  background: rgba(129, 140, 248, 0.25);
  color: var(--brand-light);
}
.inception-upload-btn {
  margin-left: auto;
  background: linear-gradient(135deg, var(--accent-gold), #f59e0b);
  border: none;
  color: #1a1830;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: filter 0.14s, transform 0.12s;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.25);
}
.inception-upload-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.inception-upload-btn:active { transform: translateY(0); }

/* Featured section */
.inc-featured-section { margin-bottom: 18px; }
.inc-featured-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.inc-featured-label {
  font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: 0.5px;
}
.inc-featured-scroll {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin; scrollbar-color: rgba(129,140,248,0.2) transparent;
}
.inc-featured-scroll::-webkit-scrollbar { height: 4px; }
.inc-featured-scroll::-webkit-scrollbar-thumb { background: rgba(129,140,248,0.25); border-radius: 2px; }
.inc-featured-card {
  flex-shrink: 0; width: 140px;
  background: linear-gradient(135deg, rgba(251,191,36,0.08), rgba(129,140,248,0.08));
  border: 1.5px solid rgba(251,191,36,0.25);
  border-radius: 12px; padding: 16px 12px; text-align: center;
  cursor: pointer; transition: all 0.18s;
}
.inc-featured-card:hover {
  border-color: rgba(251,191,36,0.6); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.inc-fc-avatar {
  width: 44px; height: 44px; border-radius: 12px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; border: 1.5px solid;
}
.inc-fc-name { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inc-fc-role { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inc-fc-stat { font-size: 9px; color: var(--text-muted); }

/* Category bar */
.inc-category-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.inc-usage-stat {
  font-size: 11px; color: var(--text-muted); font-family: var(--font-ui);
  display: flex; align-items: center; gap: 4px;
}
.inc-usage-stat strong { color: var(--accent-gold); font-weight: 700; }
.inc-stat-icon { font-size: 12px; }

/* Filter bar */
.inc-filter-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.inc-domain-tabs {
  display: flex; gap: 4px; flex-wrap: wrap; flex: 1;
}
.inc-domain-btn {
  background: transparent; border: 1.5px solid var(--border); color: var(--text-muted);
  padding: 5px 12px; border-radius: 6px; font-family: var(--font-ui);
  font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.14s;
}
.inc-domain-btn:hover { color: var(--text); border-color: var(--brand-light); }
.inc-domain-btn.active {
  background: rgba(129,140,248,0.15); color: var(--brand-light);
  border-color: rgba(129,140,248,0.4);
}
.inc-sort-group { display: flex; gap: 4px; margin-left: auto; }
.inc-sort-btn {
  background: transparent; border: 1.5px solid var(--border); color: var(--text-muted);
  padding: 5px 10px; border-radius: 6px; font-family: var(--font-ui);
  font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.14s;
}
.inc-sort-btn:hover { color: var(--text); }
.inc-sort-btn.active {
  background: rgba(129,140,248,0.15); color: var(--brand-light);
  border-color: rgba(129,140,248,0.4);
}

.inception-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.inception-card {
  position: relative;
  background: rgba(38, 35, 58, 0.55);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 16px 14px;
  transition: all 0.18s;
  cursor: default;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.inception-card:hover {
  border-color: rgba(129, 140, 248, 0.6);
  background: rgba(38, 35, 58, 0.75);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}
.inception-card.official::before,
.inception-card.community::before { display: none; }
.inc-card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.inc-card-avatar {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  border: 1.5px solid;
  flex-shrink: 0;
}
.inc-card-name {
  font-size: 14px; font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.inc-card-role {
  font-size: 10.5px;
  color: var(--text-muted);
}
.inc-card-tags {
  display: flex; gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.inc-tag {
  font-family: var(--font-pixel);
  font-size: 7.5px;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.inc-tag.official {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.inc-tag.community {
  background: rgba(45, 212, 191, 0.12);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.35);
}
.inc-tag.mine {
  background: rgba(167, 139, 250, 0.15);
  color: var(--brand-light);
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.inc-meta-row {
  font-size: 10px;
  color: var(--text-muted);
  display: flex; gap: 8px;
  flex-wrap: wrap;
}
.inc-meta-row .inc-author { color: #d8d6e8; }
.inc-card-desc {
  font-size: 11.5px;
  color: #c8c6da;
  line-height: 1.55;
  margin: 6px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.inc-card-domains {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px;
}
.inc-domain-chip {
  font-size: 9px;
  background: rgba(45, 212, 191, 0.1);
  color: #2dd4bf;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(45, 212, 191, 0.2);
}
.inc-card-caps {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 6px;
}
.inc-caps-label {
  font-size: 9px; color: var(--text-muted); margin-right: 2px;
}
.inc-card-tools {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-bottom: 6px;
}
.inc-tool-chip {
  font-size: 9px;
  background: rgba(108, 92, 231, 0.1);
  color: #b8b0f0;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid rgba(108, 92, 231, 0.2);
}
.inc-has-soul {
  color: #818cf8;
  font-weight: 600;
}
.inc-skill-chips {
  display: flex; gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.inc-skill-chip {
  font-size: 10px;
  background: rgba(167, 139, 250, 0.1);
  color: var(--brand-light);
  padding: 3px 7px;
  border-radius: 4px;
  border: 1px solid rgba(167, 139, 250, 0.2);
}
.inc-card-actions {
  display: flex; gap: 6px;
  margin-top: auto;
}
.inc-btn-clone {
  flex: 1;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  border: none;
  color: #fff;
  padding: 9px 10px;
  border-radius: 7px;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: filter 0.14s, transform 0.12s;
}
.inc-btn-clone:hover { filter: brightness(1.1); transform: translateY(-1px); }
.inc-btn-preview {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 9px 12px;
  border-radius: 7px;
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: all 0.14s;
}
.inc-btn-preview:hover { color: var(--text); border-color: var(--brand-light); }

.inception-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* template preview modal */
#incpv-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1080;
  display: none;
  align-items: center; justify-content: center;
}
#incpv-modal.active { display: flex; }
.incpv-box {
  width: min(680px, 92vw);
  max-height: 85vh;
  background: #1a1830;
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.incpv-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  background: rgba(38, 35, 58, 0.4);
  padding: 0 20px;
}
.incpv-tab {
  background: none; border: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.incpv-tab:hover { color: var(--text); }
.incpv-tab.active {
  color: var(--brand-light);
  border-bottom-color: var(--brand-light);
}
.incpv-soul-body { overflow-y: auto; }
.incpv-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}
.incpv-skill-card {
  display: flex; align-items: center; gap: 8px;
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  transition: all 0.15s;
}
.incpv-skill-card:hover {
  background: rgba(129, 140, 248, 0.15);
  border-color: rgba(129, 140, 248, 0.4);
}
.incpv-sk-icon { font-size: 16px; flex-shrink: 0; }
.incpv-sk-name { font-size: 11px; font-weight: 600; color: var(--text); }
.incpv-soul-content pre {
  font-family: var(--font-mono, 'SFMono-Regular', 'Consolas', monospace);
  font-size: 11.5px;
  line-height: 1.6;
  color: #d8d6e8;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: none;
  margin: 0;
}
.incpv-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(38, 35, 58, 0.6);
}
.incpv-avatar {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  border: 2px solid;
  flex-shrink: 0;
}
.incpv-h-info { flex: 1; min-width: 0; }
.incpv-h-name {
  font-size: 18px; font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.incpv-h-role { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.incpv-h-meta {
  font-size: 11px; color: var(--text-muted);
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.incpv-close {
  background: transparent; border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 0 6px;
}
.incpv-close:hover { color: var(--text); }
.incpv-body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px;
}
.incpv-section { margin-bottom: 16px; }
.incpv-sec-title {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--accent-gold);
  letter-spacing: 0.7px;
  margin-bottom: 8px;
}
.incpv-sec-content {
  font-size: 12.5px;
  color: #d8d6e8;
  line-height: 1.6;
}
.incpv-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.incpv-chip {
  font-size: 11px;
  background: rgba(167, 139, 250, 0.1);
  color: var(--brand-light);
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid rgba(167, 139, 250, 0.25);
}
.incpv-foot {
  display: flex; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: rgba(38, 35, 58, 0.4);
}
.incpv-foot-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 7px;
  font-family: var(--font-pixel);
  font-size: 9px; font-weight: 400; letter-spacing: 0.6px;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
  border: 2px solid var(--border);
  background: rgba(20, 18, 36, 0.55);
  color: var(--text-muted);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}
.incpv-foot-btn:hover { color: var(--text); border-color: var(--brand-light); }
.incpv-foot-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.incpv-foot-btn.primary {
  background: var(--accent-pink);
  color: #fff;
  border-color: #c43d8e;
  box-shadow: 0 3px 0 rgba(150, 50, 105, 0.7);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}
.incpv-foot-btn.primary:hover { background: #f580c0; }
.incpv-foot-btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(150, 50, 105, 0.7); }

/* ===== Pack detail page (V1.2 追加) ===== */
.dream-detail-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(129, 140, 248, 0.08);
  border: 1.5px solid rgba(129, 140, 248, 0.25);
  border-radius: 7px;
  color: var(--brand-light);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: all 0.16s;
  font-family: var(--font-ui);
  margin-bottom: 14px;
}
.dream-detail-back:hover {
  background: rgba(129, 140, 248, 0.15);
  border-color: var(--brand-light);
}
.dream-detail-head {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px;
  background: rgba(38, 35, 58, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 18px;
}
.dream-detail-head .ddh-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  border: 1.5px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.dream-detail-head .ddh-meta {
  flex: 1; min-width: 0;
}
.dream-detail-head .ddh-title {
  font-size: 15px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.dream-detail-head .ddh-layer-tag {
  font-family: var(--font-pixel);
  font-size: 8px; letter-spacing: 0.5px;
  padding: 2px 6px; border-radius: 3px;
}
.dream-detail-head .ddh-layer-tag.memory {
  background: rgba(244, 114, 182, 0.15);
  color: var(--accent-pink);
  border: 1px solid rgba(244, 114, 182, 0.35);
}
.dream-detail-head .ddh-layer-tag.skill {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.dream-detail-head .ddh-desc {
  font-size: 12px; color: var(--text-dim);
  line-height: 1.5; margin-top: 6px;
}
.dream-detail-head .ddh-policy {
  font-size: 10px; color: var(--text-muted);
  margin-top: 6px; font-style: italic;
}
.dream-detail-head .ddh-actions {
  display: flex; flex-direction: column; gap: 6px;
  flex-shrink: 0;
}
.dream-detail-head .ddh-mount-btn {
  background: var(--accent-pink);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 11px; font-weight: 700;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.16s;
  box-shadow: 0 3px 0 rgba(190, 70, 130, 0.45);
}
.dream-detail-head .ddh-mount-btn:hover { transform: translateY(-1px); }
.dream-detail-head .ddh-mount-btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(190, 70, 130, 0.45); }
.dream-detail-head .ddh-mount-btn.skill {
  background: var(--accent-gold);
  color: #0c2725;
  box-shadow: 0 3px 0 rgba(180, 130, 30, 0.45);
}
.dream-detail-head .ddh-mounted-summary {
  font-size: 10px; color: var(--text-muted);
  text-align: right;
  line-height: 1.5;
}

.dream-detail-section {
  margin-bottom: 22px;
}
.dream-detail-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.dream-detail-section-title {
  font-family: var(--font-pixel);
  font-size: 11px; color: var(--text);
  letter-spacing: 1.5px;
  display: flex; align-items: center; gap: 8px;
}
.dream-detail-section-title .bar {
  width: 4px; height: 14px;
  background: var(--accent-pink);
  border-radius: 1px;
}
.dream-detail-section-title.skill .bar { background: var(--accent-gold); }

.dream-doc-list {
  display: flex; flex-direction: column; gap: 6px;
}
.dream-doc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: all 0.16s;
  cursor: pointer;
}
.dream-doc-row:hover {
  border-color: var(--accent-pink);
  background: rgba(244, 114, 182, 0.05);
}
.dream-doc-row.skill:hover {
  border-color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.05);
}
.dream-doc-icon { font-size: 14px; flex-shrink: 0; }
.dream-doc-name {
  flex: 1;
  font-size: 12px; color: var(--text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dream-doc-meta {
  font-size: 10px; color: var(--text-muted);
  flex-shrink: 0;
}
.dream-doc-add {
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.18s;
  margin-top: 4px;
}
.dream-doc-add:hover {
  border-color: var(--brand-light);
  color: var(--brand-light);
}

.dream-mounted-bots {
  display: flex; flex-direction: column; gap: 6px;
}
.dream-mounted-bot-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 11px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 8px;
}
.dream-mounted-bot-row .mbr-name {
  flex: 1; font-size: 12px; color: var(--text); font-weight: 600;
}
.dream-mounted-bot-row .mbr-state {
  font-size: 10px; color: var(--text-muted); margin-top: 2px;
}
.dream-mounted-bot-row .mbr-info { flex: 1; min-width: 0; }
.dream-mounted-bot-row .mbr-unmount-btn {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 10px; font-weight: 700;
  cursor: pointer;
  font-family: var(--font-ui);
}
.dream-mounted-bot-row .mbr-unmount-btn:hover {
  background: rgba(231, 76, 60, 0.2);
}
.dream-mounted-empty {
  text-align: center; padding: 20px;
  color: var(--text-muted);
  font-size: 11px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
}

/* Bot info panel: dreamscape mounts */
.bip-mount-section {
  background: rgba(129, 140, 248, 0.06);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 8px;
  padding: 10px 11px;
  margin-top: 10px;
}
.bip-mount-section .bms-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.16s;
}
.bip-mount-section .bms-row:hover {
  background: rgba(129, 140, 248, 0.1);
}
.bip-mount-section .bms-row.skill:hover {
  background: rgba(251, 191, 36, 0.1);
}
.bip-mount-section .bms-icon {
  font-size: 14px;
}
.bip-mount-section .bms-name {
  flex: 1;
  font-size: 11px; color: var(--text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bip-mount-section .bms-unmount {
  font-size: 9px; color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  font-weight: 700;
}
.bip-mount-empty {
  font-size: 10px; color: var(--text-muted);
  text-align: center; padding: 8px;
  font-style: italic;
}
/* Bot Dream panel — empty hero (V1.2 polish) */
.bdp-empty-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 28px 20px 22px;
  margin-top: 16px;
  background: linear-gradient(180deg, rgba(129, 140, 248,0.08), rgba(99,102,241,0.04));
  border: 1px dashed rgba(129, 140, 248,0.35);
  border-radius: 12px;
}
.bdp-empty-art {
  width: 64px; height: 64px;
  display: grid; place-items: center;
  margin-bottom: 14px;
  image-rendering: pixelated;
}
.bdp-empty-title {
  font-family: var(--font-pixel);
  font-size: 10px; letter-spacing: 0.6px;
  color: var(--brand-light);
  margin-bottom: 8px;
}
.bdp-empty-desc {
  font-size: 11px; color: var(--text-dim); line-height: 1.6;
  max-width: 220px; margin-bottom: 16px;
}
.bdp-empty-desc .tag-mem { color: var(--accent-pink); font-weight: 600; }
.bdp-empty-desc .tag-skl { color: var(--accent-gold); font-weight: 600; }
.bdp-empty-cta {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 700;
  background: var(--brand);
  border: 1px solid var(--brand-light);
  color: #fff;
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 2px 0 var(--brand-dark);
}
.bdp-empty-cta:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--brand-dark), 0 4px 12px rgba(99,102,241,0.35);
}
.bdp-empty-cta:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--brand-dark);
}
.bip-mount-group-title {
  font-family: var(--font-pixel);
  font-size: 8px; letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 4px;
  margin-top: 2px;
}
.bip-mount-group-title.skill { color: var(--accent-gold); }
.bip-mount-group-title.memory { color: var(--accent-pink); }
.bip-mount-group + .bip-mount-group { margin-top: 8px; }

/* Mount modal */
#dream-mount-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(14, 12, 28, 0.94);
  z-index: 600;
  align-items: center;
  justify-content: center;
}
#dream-mount-modal.active { display: flex; }
.dream-mount-card {
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  width: 460px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 8px 0 rgba(129, 140, 248, 0.3), 0 0 30px rgba(129, 140, 248, 0.1);
}
.dream-mount-head {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 14px;
}
.dream-mount-head .dmh-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  border: 1.5px solid;
  flex-shrink: 0;
}
.dream-mount-title { font-size: 14px; font-weight: 700; color: #fff; }
.dream-mount-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.dream-mount-list {
  overflow: auto;
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 14px;
  max-height: 380px;
}
.dream-mount-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
}
.dream-mount-row:hover { border-color: var(--brand-light); }
.dream-mount-row.checked {
  background: rgba(129, 140, 248, 0.08);
  border-color: var(--brand-light);
}
.dream-mount-checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; font-weight: 700;
  flex-shrink: 0;
}
.dream-mount-row.checked .dream-mount-checkbox {
  background: var(--brand-light);
  border-color: var(--brand-light);
}
.dream-mount-info { flex: 1; min-width: 0; }
.dream-mount-name { font-size: 12px; color: var(--text); font-weight: 600; }
.dream-mount-state { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.dream-mount-actions {
  display: flex; gap: 10px; justify-content: flex-end;
}
.dream-mount-empty {
  text-align: center; color: var(--text-muted);
  font-size: 12px; padding: 24px 8px;
  line-height: 1.6;
}

/* ========= MANAGE MODAL ========= */
/* Hire Bot Modal */
#hire-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(14, 12, 28, 0.94);
  z-index: 500;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#hire-modal.active { display: flex; }
.hire-modal-close {
  position: absolute; top: 20px; right: 28px;
  font-size: 28px; color: #888; background: none; border: none;
  cursor: pointer; z-index: 10; transition: color 0.2s;
}
.hire-modal-close:hover { color: #fff; }
/* V1.2 split layout: left (cards) + right (detail) */
.hire-modal-content {
  display: flex; flex-direction: row; gap: 22px;
  width: 100%; max-width: 1180px; padding: 0 24px;
  max-height: calc(100vh - 130px);
}
.hire-modal-left {
  flex: 1 1 56%;
  display: flex; flex-direction: column;
  min-width: 0;
  max-height: 100%;
}
.hire-modal-right {
  flex: 1 1 44%;
  min-width: 380px;
  max-width: 480px;
  display: flex; flex-direction: column;
  max-height: 100%;
}
#hire-modal-header {
  text-align: left; margin-bottom: 14px;
  flex-shrink: 0;
}
#hire-modal-header h2 {
  font-family: var(--font-ui); font-size: 19px; font-weight: 700; color: #fff; margin: 0 0 4px;
}
.hire-modal-hint {
  font-family: var(--font-ui); font-size: 12px; color: #888;
}
#hire-modal-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  width: 100%; margin-bottom: 14px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
#hire-modal-cards::-webkit-scrollbar { width: 5px; }
#hire-modal-cards::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15); border-radius: 3px;
}
.hm-refresh {
  color: var(--brand-light); cursor: pointer; transition: color 0.2s;
}
.hm-refresh:hover { color: #fff; }
.hire-card {
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 8px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.hire-card:hover {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99, 102, 241, 0.04);
}
.hire-card .hc-avatar {
  width: 60px; height: 44px;
  background: rgba(30, 30, 50, 0.6); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hire-card .hc-avatar canvas { image-rendering: pixelated; }
.hire-card .hc-header-row {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.hire-card .hc-name {
  font-family: var(--font-ui); font-size: 15px; font-weight: 700; color: #fff;
  text-align: left; width: 100%; margin-bottom: 6px;
}
.hire-card .hc-divider {
  width: 100%; height: 1px; background: rgba(255,255,255,0.06); margin: 2px 0 6px;
}
.hire-card .hc-labeled-section {
  width: 100%; margin-bottom: 5px; text-align: left;
}
.hire-card .hc-section-label {
  font-family: var(--font-ui); font-size: 9px; font-weight: 700;
  color: #555; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px;
}
.hire-card .hc-models {
  display: flex; flex-wrap: wrap; gap: 5px; width: 100%; margin-bottom: 8px;
}
.hire-card .hc-model-tag {
  font-family: var(--font-ui); font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(74, 222, 128, 0.08); color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.18);
}
.hire-card .hc-focus-row {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.hire-card .hc-focus-tag {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  padding: 3px 12px; border-radius: 8px;
  background: rgba(251, 191, 36, 0.12); color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.hire-card .hc-price-big {
  font-family: var(--font-ui); font-size: 18px; font-weight: 800; color: #4ade80;
  white-space: nowrap;
}
.hire-card .hc-price-unit {
  font-size: 12px; font-weight: 500; color: #6ee7a0;
}
.hire-card .hc-skills {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.hire-card .hc-skill-tag {
  font-family: var(--font-ui); font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(99, 102, 241, 0.08); color: var(--brand-light);
  border: 1px solid rgba(99, 102, 241, 0.18);
}
.hire-card .hc-slots { display: flex; flex-wrap: wrap; gap: 4px; }
.hire-card .hc-slot-tag {
  font-family: var(--font-ui); font-size: 10px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(56,189,248,0.08); color: #38bdf8;
  border: 1px solid rgba(56,189,248,0.18);
}
.hire-card .hc-hire-btn {
  width: 100%; margin-top: 14px; padding: 9px 0;
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  color: #fff; background: var(--brand); border: none; border-radius: 10px;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.hire-card .hc-hire-btn:hover {
  background: #818cf8; transform: scale(1.03);
}
/* V1.2: subtle selected state instead of scale-up — detail is always visible on right */
#hire-modal-cards .hire-card.hc-focused {
  border-color: var(--brand);
  background: rgba(99, 102, 241, 0.06);
  position: relative;
}
#hire-modal-cards .hire-card.hc-focused::before {
  content: ''; position: absolute; left: -3px; top: 14px; bottom: 14px;
  width: 3px; border-radius: 2px;
  background: var(--brand);
}
/* Hide the in-card hire button — confirm via right-side panel only */
#hire-modal-cards .hire-card .hc-hire-btn { display: none; }
.hire-modal-input-wrap {
  width: 100%; max-width: 680px; margin-top: 16px;
}
#hire-search-input {
  width: 100%; padding: 16px 20px;
  font-family: var(--font-ui); font-size: 14px;
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  color: #fff; outline: none;
  transition: border-color 0.2s;
}
#hire-search-input:focus { border-color: var(--brand); }
#hire-search-input::placeholder { color: #666; }

/* ===== HIRE DETAIL PANEL (V1.2 inline right column) ===== */
#hire-detail-panel {
  display: flex; flex-direction: column;
  width: 100%; height: 100%;
  background: rgba(20, 18, 36, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
#hire-detail-panel::-webkit-scrollbar { width: 5px; }
#hire-detail-panel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15); border-radius: 3px;
}
#hire-detail-panel.empty .hdp-body { display: none; }
#hire-detail-panel.empty .hdp-empty { display: flex; }
#hire-detail-panel:not(.empty) .hdp-empty { display: none; }
.hdp-empty {
  flex: 1;
  flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  color: var(--text-muted);
  padding: 40px 24px;
  gap: 12px;
}
.hdp-empty-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.08);
  border: 1.5px dashed rgba(99, 102, 241, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.hdp-empty-text {
  font-size: 14px; font-weight: 600; color: var(--text-dim);
}
.hdp-empty-hint {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}
.hdp-back {
  /* legacy back button — hidden in V1.2 split layout */
  display: none;
}
.hdp-body {
  width: 100%;
}
.hdp-top {
  text-align: center; margin-bottom: 16px;
}
.hdp-avatar {
  width: 72px; height: 50px; margin: 0 auto 8px;
  background: rgba(30, 30, 50, 0.6); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.hdp-avatar canvas { image-rendering: pixelated; }
.hdp-name {
  font-family: var(--font-ui); font-size: 17px; font-weight: 800; color: #fff;
}
.hdp-section { margin-bottom: 14px; }
.hdp-label {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  color: #888; margin-bottom: 8px;
}
.hdp-models, .hdp-focuses, .hdp-skills {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.hdp-models .tag {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 8px;
  background: rgba(74, 222, 128, 0.1); color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.hdp-focuses .tag {
  font-family: var(--font-ui); font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 8px;
  background: rgba(251, 191, 36, 0.12); color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.hdp-skills .tag {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 8px;
  background: rgba(99, 102, 241, 0.1); color: var(--brand-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.hdp-slots {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.hdp-slots .slot {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 8px;
  background: rgba(56, 189, 248, 0.1); color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
  cursor: pointer; transition: all 0.2s;
}
.hdp-slots .slot:hover {
  background: rgba(56, 189, 248, 0.2);
}
.hdp-slots .slot.selected {
  background: rgba(56, 189, 248, 0.3); color: #fff;
  border-color: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}
.bip-tag.slot-select {
  cursor: pointer; transition: all 0.2s;
}
.bip-tag.slot-select:hover {
  background: rgba(56, 189, 248, 0.2) !important;
}
.bip-tag.slot-select.selected {
  background: rgba(56, 189, 248, 0.3) !important; color: #fff !important;
  border-color: #38bdf8 !important; box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}
.hdp-divider {
  height: 1px; background: rgba(255,255,255,0.06); margin: 20px 0;
}
.hdp-cost-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.hdp-cost {
  font-family: var(--font-ui); font-size: 24px; font-weight: 800; color: var(--brand);
}
.hdp-hire-btn {
  width: 100%; padding: 14px 0;
  font-family: var(--font-ui); font-size: 16px; font-weight: 800;
  color: #0a0a1a; background: #4ade80; border: none; border-radius: 14px;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.5px;
}
.hdp-hire-btn:hover { background: #6ee7a0; transform: scale(1.02); }
.hdp-tips {
  margin-top: 16px; padding: 14px 16px;
  background: rgba(255,255,255,0.03); border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}
.hdp-tip {
  font-family: var(--font-ui); font-size: 12px; color: #777;
  line-height: 1.8;
  padding-left: 16px; position: relative;
}
.hdp-tip::before {
  content: '•'; position: absolute; left: 0; color: #555;
}

/* ===== HIRE SUCCESS MODAL ===== */
/* z-index tier: top-priority modal (700) */
#hire-success-modal {
  display: none; position: fixed; inset: 0; z-index: 700;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  justify-content: center; align-items: center;
}
#hire-success-modal.active { display: flex; }
.hsm-box {
  background: var(--bg-panel); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 36px 48px; text-align: center;
  max-width: 480px; width: 90%; animation: hsmPop 0.35s cubic-bezier(.4,0,.2,1);
}
@keyframes hsmPop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.hsm-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  background: #4ade80; border-radius: 50%;
  font-size: 26px; line-height: 52px; color: #0a0a1a; font-weight: 900;
}
.hsm-title {
  font-family: var(--font-ui); font-size: 20px; font-weight: 800; color: #fff;
  margin-bottom: 6px;
}
.hsm-bot-name {
  font-family: var(--font-ui); font-size: 14px; color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}
.hsm-bot-name strong { color: #fff; }
.hsm-details {
  background: rgba(14, 12, 28, 0.5); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 20px; margin-bottom: 16px;
  text-align: left;
}
.hsm-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
}
.hsm-detail-row + .hsm-detail-row {
  border-top: 1px solid rgba(255,255,255,0.04);
}
.hsm-detail-label {
  font-family: var(--font-ui); font-size: 12px; color: rgba(255,255,255,0.4);
}
.hsm-detail-value {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700; color: #fff;
}
.hsm-note {
  font-family: var(--font-ui); font-size: 11px; color: rgba(255,255,255,0.3);
  margin-bottom: 18px;
}
.hsm-btn {
  width: 100%; padding: 12px 0;
  font-family: var(--font-ui); font-size: 15px; font-weight: 700;
  color: #0a0a1a; background: #4ade80; border: none; border-radius: 12px;
  cursor: pointer; transition: background 0.2s;
}
.hsm-btn:hover { background: #6ee7a0; }

/* ===== RETURN CONFIRM MODAL ===== */
#return-modal {
  display: none; position: fixed; inset: 0; z-index: 700;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  justify-content: center; align-items: center;
}
#return-modal.active { display: flex; }
.rtm-box {
  background: var(--bg-panel); border: 1.5px solid var(--border);
  border-radius: 20px; padding: 40px 48px; text-align: center;
  max-width: 420px; width: 90%; animation: hsmPop 0.35s cubic-bezier(.4,0,.2,1);
}
.rtm-icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  background: rgba(245, 158, 11, 0.15); border-radius: 50%;
  font-size: 28px; line-height: 56px; color: #f59e0b;
}
.rtm-title {
  font-family: var(--font-ui); font-size: 20px; font-weight: 800; color: #fff;
  margin-bottom: 8px;
}
.rtm-subtitle {
  font-family: var(--font-ui); font-size: 13px; color: #888;
  margin-bottom: 24px;
}
.rtm-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 24px;
}
.rtm-stat {
  background: rgba(14, 12, 28, 0.5); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 12px; text-align: center;
}
.rtm-stat-label { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.rtm-stat-value { font-size: 20px; font-weight: 800; color: #fff; }
.rtm-buttons { display: flex; gap: 12px; }
.rtm-btn {
  flex: 1; padding: 12px 0;
  font-family: var(--font-ui); font-size: 15px; font-weight: 700;
  border: none; border-radius: 12px; cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.rtm-btn.cancel {
  background: rgba(255,255,255,0.06); color: #aaa; border: 1px solid var(--border);
}
.rtm-btn.cancel:hover { background: rgba(255,255,255,0.1); }
.rtm-btn.confirm {
  background: #f59e0b; color: #0a0a1a;
}
.rtm-btn.confirm:hover { background: #fbbf24; transform: scale(1.02); }

/* ===== RETURN SUCCESS MODAL ===== */
#return-success-modal {
  display: none; position: fixed; inset: 0; z-index: 700;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  justify-content: center; align-items: center;
}
#return-success-modal.active { display: flex; }

/* ===== PLACEHOLDER MODALS (V1.2 — Deposit / Withdraw / Connect Bot) ===== */
/* z-index tier: modal (550) */
.placeholder-modal {
  display: none; position: fixed; inset: 0;
  background: rgba(10, 10, 26, 0.85);
  z-index: 550; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.placeholder-modal.active { display: flex; }
.pm-box {
  width: 90%; max-width: 420px;
  background: var(--bg-panel);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  animation: pmPop 0.28s cubic-bezier(.4,0,.2,1);
  position: relative;
}
@keyframes pmPop {
  0% { transform: scale(0.94); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.pm-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-dim);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px;
  transition: color 0.15s;
}
.pm-close:hover { color: #fff; }
.pm-preview-badge {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 8px; letter-spacing: 0.5px;
  padding: 3px 7px; border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: var(--brand-light);
  margin-bottom: 10px;
}
.pm-title {
  font-size: 16px; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.pm-sub {
  font-size: 12px; color: var(--text-dim);
  margin-bottom: 16px;
}
.pm-section {
  margin-bottom: 14px;
}
.pm-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.pm-input, .pm-select {
  width: 100%; padding: 9px 12px;
  background: rgba(14, 12, 28, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 13px; color: #fff;
  transition: border-color 0.15s;
}
.pm-input:focus, .pm-select:focus {
  outline: none;
  border-color: var(--brand);
}
.pm-quick-amounts {
  display: flex; gap: 6px; margin-top: 6px;
}
.pm-quick-btn {
  flex: 1; padding: 6px 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 12px; color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.pm-quick-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--brand);
  color: #fff;
}
.pm-quick-btn.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--brand);
  color: #fff;
}
.pm-balance-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 12px;
  background: rgba(14, 12, 28, 0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
}
.pm-balance-label {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.pm-balance-value {
  font-size: 17px; font-weight: 700; color: #22c55e;
  font-variant-numeric: tabular-nums;
}
.pm-code-block {
  background: rgba(14, 12, 28, 0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 11px; color: var(--brand-light);
  word-break: break-all;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.pm-copy-btn {
  flex-shrink: 0;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10px; color: var(--brand-light);
  cursor: pointer;
  transition: all 0.15s;
}
.pm-copy-btn:hover {
  background: rgba(99,102,241,0.25);
  color: #fff;
}
.pm-copy-btn.copied {
  background: rgba(34,197,94,0.2);
  color: #4ade80;
  border-color: rgba(34,197,94,0.4);
}
.pm-actions {
  display: flex; gap: 8px; margin-top: 18px;
}
.pm-btn {
  flex: 1; padding: 10px 0;
  border-radius: 8px; border: none;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.pm-btn-primary {
  background: var(--brand);
  color: #fff;
}
.pm-btn-primary:hover { background: var(--brand-dark); }
.pm-btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.pm-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}
.pm-method-list {
  display: flex; flex-direction: column; gap: 6px;
}
.pm-method {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  background: rgba(14, 12, 28, 0.4);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.pm-method:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(14, 12, 28, 0.6);
}
.pm-method.selected {
  border-color: var(--brand);
  background: rgba(99, 102, 241, 0.08);
}
.pm-method-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.pm-method-info { flex: 1; min-width: 0; }
.pm-method-name {
  font-size: 12px; font-weight: 600; color: #fff;
}
.pm-method-desc {
  font-size: 10px; color: var(--text-muted);
  margin-top: 1px;
}
.pm-method-radio {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.pm-method.selected .pm-method-radio {
  border-color: var(--brand);
}
.pm-method.selected .pm-method-radio::after {
  content: ''; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

/* ======= LISTING TOAST ======= */
#listing-toast {
  display: none; position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
  z-index: 9999; padding: 14px 24px; border-radius: 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  font-family: var(--font-ui); align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  min-width: 280px;
}
#listing-toast.lt-listed {
  background: rgba(16, 20, 36, 0.92); border: 1px solid rgba(244, 114, 182, 0.4);
}
#listing-toast.lt-unlisted {
  background: rgba(16, 20, 36, 0.92); border: 1px solid rgba(251, 191, 36, 0.4);
}
.lt-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
/* Fix7: listed=pink, idle/unlisted=gold */
.lt-listed .lt-icon { background: rgba(244,114,182,0.15); color: var(--accent-pink); }
.lt-unlisted .lt-icon { background: rgba(251,191,36,0.15); color: var(--accent-gold); }
.lt-text { display: flex; flex-direction: column; gap: 2px; }
.lt-text strong { font-size: 14px; font-weight: 700; color: #fff; }
.lt-sub { font-size: 11px; color: rgba(255,255,255,0.5); }
@keyframes ltSlideIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes ltSlideOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(-12px); }
}

/* ======= RENTAL SETTINGS SIDE PANEL ======= */
#rental-panel {
  display: none; position: fixed; top: 56px; right: 0; bottom: 0;
  width: 360px; background: var(--bg-panel);
  border-left: 1px solid var(--border);
  z-index: 200; overflow-y: auto; overflow-x: hidden;
  padding: 18px 20px; box-sizing: border-box;
  animation: slideInRight 0.3s ease-out;
}
#rental-panel.active { display: block; }
.rm-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--text-dim);
  font-size: 20px; cursor: pointer; padding: 4px;
  transition: color 0.2s;
}
.rm-close:hover { color: #fff; }
.rm-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rm-bot-name { font-size: 14px; font-weight: 700; color: #fff; }
/* Fix7: listed=pink */
.rm-bot-status { font-size: 10px; color: var(--accent-pink); margin-top: 2px; }
.rm-section-label {
  font-size: 10px; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 6px; margin-top: 14px;
}
.rm-price-row {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.rm-price-adj {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 16px; font-weight: 300;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.rm-price-adj:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.rm-price-adj:active { transform: scale(0.95); }
.rm-price-display {
  font-size: 28px; font-weight: 700; color: #4ade80;
  font-variant-numeric: tabular-nums;
}
.rm-price-unit { font-size: 12px; font-weight: 400; color: rgba(74,222,128,0.6); margin-left: 2px; }
.rm-price-hint {
  text-align: center; font-size: 11px; color: var(--text-dim);
  margin-top: 4px;
}
/* All Time quick select */
.rm-mode-tabs {
  display: flex; gap: 0; margin-bottom: 12px;
  background: rgba(255,255,255,0.04); border-radius: 10px; padding: 3px;
}
.rm-mode-tab {
  flex: 1; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; text-align: center;
  background: transparent; color: rgba(255,255,255,0.4);
  transition: all 0.25s;
}
.rm-mode-tab:hover { color: rgba(255,255,255,0.6); }
.rm-mode-tab.active {
  background: rgba(74,222,128,0.15); color: #4ade80;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
/* Time slot rows */
.rm-slot-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.rm-slot-row {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 8px 10px;
}
.rm-time-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; font-size: 13px; font-weight: 600; padding: 7px 12px;
  border-radius: 8px; cursor: pointer; min-width: 72px; text-align: center;
  transition: all 0.2s; position: relative;
}
.rm-time-btn:hover { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.12); }
.rm-time-btn.open { border-color: #6366f1; background: rgba(99,102,241,0.1); }
.rm-time-dropdown {
  position: absolute; left: 0; top: calc(100% + 4px);
  width: 88px; max-height: 200px; overflow-y: auto;
  background: #1e1b35; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; z-index: 300; padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.rm-time-dropdown::-webkit-scrollbar { width: 4px; }
.rm-time-dropdown::-webkit-scrollbar-track { background: transparent; }
.rm-time-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.rm-time-opt {
  padding: 6px 10px; border-radius: 6px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.6); cursor: pointer; text-align: center;
  transition: all 0.15s;
}
.rm-time-opt:hover { background: rgba(255,255,255,0.08); color: #fff; }
.rm-time-opt.selected { background: rgba(99,102,241,0.2); color: #a5b4fc; font-weight: 700; }
.rm-slot-arrow { color: rgba(255,255,255,0.3); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.rm-slot-del {
  width: 26px; height: 26px; border-radius: 6px; border: none;
  background: rgba(239,68,68,0.1); color: #ef4444; font-size: 14px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.2s;
}
.rm-slot-del:hover { background: rgba(239,68,68,0.25); }
.rm-add-slot {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; border-radius: 8px; border: 1px dashed rgba(255,255,255,0.12);
  background: none; color: rgba(255,255,255,0.4); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; width: 100%;
}
.rm-add-slot:hover { border-color: rgba(99,102,241,0.4); color: #818cf8; background: rgba(99,102,241,0.05); }
.rm-add-slot.disabled { opacity: 0.3; pointer-events: none; }
.rm-listing-btn {
  width: 100%; padding: 14px; margin-top: 20px;
  border-radius: 12px; border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; font-size: 14px;
  font-weight: 700; letter-spacing: 1px; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, background 0.3s;
  box-shadow: 0 4px 16px rgba(34,197,94,0.3);
}
.rm-listing-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(34,197,94,0.4); }
.rm-listing-btn:active { transform: scale(0.98); }
.rm-listing-btn.listed {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}
.rm-listing-btn.listed:hover { box-shadow: 0 6px 24px rgba(239,68,68,0.4); }
/* Disabled state when listed */
#rental-panel.listed .rm-price-adj { opacity: 0.3; pointer-events: none; }
#rental-panel.listed .rm-price-display { opacity: 0.5; }
#rental-panel.listed .rm-mode-tabs { opacity: 0.4; pointer-events: none; }
#rental-panel.listed #rm-custom-slots { opacity: 0.4; pointer-events: none; }

#manage-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(14, 12, 28, 0.92);
  z-index: 500;
  align-items: center; justify-content: center;
}
#manage-modal.active { display: flex; }
.manage-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 780px; max-height: 85vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.manage-box .mm-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.manage-box .mm-header h2 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.manage-box .mm-header .mm-subtitle { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.manage-box .mm-close {
  font-size: 20px; background: none; border: none;
  color: var(--text-muted); cursor: pointer; padding: 4px 8px;
}
.manage-box .mm-close:hover { color: #fff; }
.manage-box .mm-body { display: flex; flex: 1; min-height: 0; }
.manage-box .mm-left {
  width: 50%; border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.manage-box .mm-right {
  width: 50%; display: flex; flex-direction: column;
}
.mm-left-header, .mm-right-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mm-left-label, .mm-right-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.mm-name-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; margin-bottom: 6px; letter-spacing: 0.5px;
}
#mm-name-input {
  font-family: var(--font-ui);
  font-size: 14px; width: 100%;
  padding: 10px 12px;
  background: rgba(14, 12, 28, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: #fff; outline: none;
}
#mm-name-input:focus { border-color: var(--brand); }
#mm-search {
  font-family: var(--font-ui);
  font-size: 13px; width: 100%; margin-top: 10px;
  padding: 8px 12px;
  background: rgba(14, 12, 28, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff; outline: none;
}
#mm-search:focus { border-color: var(--brand); }
#mm-search::placeholder { color: var(--text-muted); }
.mm-left-list, .mm-right-list {
  flex: 1; overflow-y: auto; padding: 8px;
}
.mm-bot-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px;
  cursor: pointer; transition: background 0.15s;
}
.mm-bot-row:hover { background: rgba(99, 102, 241, 0.08); }
.mm-bot-row.in-group { background: rgba(99, 102, 241, 0.1); }
.mm-member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 8px;
}
.mm-av {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(14, 12, 28, 0.6);
  border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  image-rendering: pixelated;
}
.mm-av canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 28px; height: 28px;
}
.mm-info { flex: 1; min-width: 0; }
.mm-name { font-size: 13px; font-weight: 600; color: var(--text); }
.mm-desc { font-size: 12px; color: var(--text-muted); }
.mm-toggle {
  font-size: 16px; color: var(--brand-light);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
}
.mm-role-tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-light);
}
.mm-remove {
  font-size: 18px; background: none; border: none;
  color: var(--text-muted); cursor: pointer; padding: 4px;
}
.mm-remove:hover { color: #f87171; }
.mm-right-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--text-muted); font-size: 13px; padding: 40px;
  line-height: 1.8;
}
.manage-box .mm-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.mm-footer .mm-btn {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.mm-btn.cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.mm-btn.cancel:hover { border-color: var(--brand); color: #fff; }
.mm-btn.confirm {
  background: var(--brand);
  border: none; color: #fff;
}
.mm-btn.confirm:hover { background: var(--brand-dark); }
.mm-btn.confirm:disabled { opacity: 0.4; cursor: not-allowed; }

/* Bot Info Panel */
/* z-index tier: panels (200) — slide-out overlay panels */
#bot-info-panel {
  display: none;
  position: fixed; top: 56px; right: 0; bottom: 0;
  width: 360px;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  z-index: 200;
  overflow-y: auto; padding: 18px 20px;
  animation: slideInRight 0.3s ease-out;
}
#bot-info-panel.active { display: block; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#bot-info-panel .bip-close {
  position: absolute; top: 16px; right: 16px;
  font-size: 20px; background: none; border: none;
  color: var(--text-muted); cursor: pointer;
}
#bot-info-panel .bip-close:hover { color: #fff; }
#bot-info-panel .bip-avatar-wrap {
  width: 60px; height: 60px;
  margin: 0 auto 10px;
  background: rgba(14, 12, 28, 0.6);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  image-rendering: pixelated;
}
#bot-info-panel .bip-avatar-wrap canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 48px; height: 48px;
}
#bot-info-panel .bip-name {
  font-size: 16px; font-weight: 700; color: #fff;
  text-align: center; margin-bottom: 4px;
}
#bot-info-panel .bip-desc {
  font-size: 12px; color: var(--text-dim);
  text-align: center; margin-bottom: 12px; line-height: 1.55;
}
#bot-info-panel .bip-section {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 1px; margin-bottom: 8px; margin-top: 14px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border); padding-bottom: 5px;
}
#bot-info-panel .bip-tags {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
#bot-info-panel .bip-tag {
  font-size: 11px; font-weight: 600;
  padding: 5px 12px; border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--brand-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
}
#bot-info-panel .bip-divider {
  height: 1px; background: rgba(255,255,255,0.06); margin: 20px 0;
}
#bot-info-panel .bip-cost-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
#bot-info-panel .bip-cost {
  font-family: var(--font-ui); font-size: 20px; font-weight: 800; color: var(--brand);
}
#bot-info-panel .bip-hire-btn {
  width: 100%; padding: 11px 0; margin-top: 14px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 800;
  color: #0a0a1a; background: #4ade80; border: none; border-radius: 10px;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.5px;
}
#bot-info-panel .bip-hire-btn:hover { background: #6ee7a0; transform: scale(1.02); }
#bot-info-panel .bip-tips {
  margin-top: 12px; padding: 10px 12px;
  background: rgba(255,255,255,0.03); border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
#bot-info-panel .bip-tip {
  font-family: var(--font-ui); font-size: 12px; color: #777;
  line-height: 1.8;
  padding-left: 16px; position: relative;
}
#bot-info-panel .bip-tip::before {
  content: '•'; position: absolute; left: 0; color: #555;
}
#bot-info-panel .bip-usage-info {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 10px;
  padding: 14px; margin-top: 4px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
#bot-info-panel .bip-usage-item { text-align: center; }
#bot-info-panel .bip-usage-label { font-size: 10px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; }
#bot-info-panel .bip-usage-value { font-size: 16px; font-weight: 700; color: var(--brand); }
#bot-info-panel .bip-expire-info {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  padding: 14px; margin-top: 16px;
}
#bot-info-panel .bip-expire-label { font-size: 11px; font-weight: 700; color: #f59e0b; margin-bottom: 4px; }
#bot-info-panel .bip-expire-value { font-size: 14px; font-weight: 600; color: var(--accent-gold); }
#bot-info-panel .bip-earnings-info {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 10px;
  padding: 14px; margin-top: 16px;
}
#bot-info-panel .bip-earnings-label { font-size: 11px; font-weight: 700; color: var(--accent-gold); margin-bottom: 4px; }
#bot-info-panel .bip-earnings-value { font-size: 14px; font-weight: 600; color: var(--accent-gold); }

/* Bot Dreamscape Panel (盗梦空间) — separate slide-in panel */
#bot-dream-panel {
  display: none;
  position: fixed; top: 56px; right: 0; bottom: 0;
  width: 360px;
  background: var(--bg-panel);
  border-left: 1px solid rgba(129, 140, 248, 0.25);
  z-index: 200;
  overflow-y: auto; padding: 18px 20px;
  animation: slideInRight 0.3s ease-out;
}
#bot-dream-panel.active { display: block; }
#bot-dream-panel .bdp-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-muted);
  font-size: 22px; cursor: pointer; line-height: 1;
}
#bot-dream-panel .bdp-close:hover { color: #fff; }
#bot-dream-panel .bdp-header {
  display: flex; align-items: center; gap: 10px;
  padding-right: 28px;
  margin-bottom: 14px;
}
#bot-dream-panel .bdp-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(129, 140, 248, 0.12);
  border: 1.5px solid rgba(129, 140, 248, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
#bot-dream-panel .bdp-title {
  font-size: 14px; font-weight: 700; color: #fff;
}
#bot-dream-panel .bdp-sub {
  font-size: 11px; color: var(--text-muted); margin-top: 1px;
}
#bot-dream-panel .bip-section {
  font-family: var(--font-pixel);
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  margin: 14px 0 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Minimap */

/* Login modal */
/* ======= APPLE GLASS LOGIN/REGISTER ======= */
#login-modal {
  display: none;
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, #111c32 0%, #0a0f1c 45%, #060a14 100%);
  z-index: 500;
  align-items: center; justify-content: center;
  flex-direction: column;
}
#login-modal::before {
  content: ''; position: absolute; top: -30%; left: 20%; width: 60%; height: 60%;
  background: radial-gradient(ellipse, rgba(59,130,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
#login-modal.active { display: flex; }
.login-box {
  position: relative;
  background: linear-gradient(165deg,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  padding: 48px 44px 40px;
  width: 420px; text-align: center;
  backdrop-filter: blur(60px) saturate(1.4); -webkit-backdrop-filter: blur(60px) saturate(1.4);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.45),
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 1px 0 rgba(255,255,255,0.05) inset;
  animation: glassSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes glassSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-icon {
  width: 56px; height: 56px; margin: 0 auto 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: 0 6px 24px rgba(59,130,246,0.3), 0 0 0 1px rgba(59,130,246,0.15) inset;
}
.login-title {
  font-family: var(--font-ui); font-size: 24px; font-weight: 200;
  color: rgba(255,255,255,0.9); letter-spacing: 8px; margin-bottom: 8px;
  text-transform: uppercase;
}
.login-subtitle {
  font-size: 14px; color: rgba(255,255,255,0.35); margin-bottom: 36px;
  font-weight: 300;
}
.login-input-wrap {
  position: relative; margin-bottom: 14px;
}
.login-box input {
  font-family: var(--font-ui); font-size: 15px;
  width: 100%; padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px; color: #fff; outline: none;
  transition: border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.3s cubic-bezier(0.25, 1, 0.5, 1),
              background 0.3s;
  box-sizing: border-box;
}
.login-box input::placeholder { color: rgba(255,255,255,0.2); }
.login-box input:focus {
  border-color: rgba(59,130,246,0.35);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.06);
  background: rgba(0,0,0,0.28);
}
.login-send-code {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 1px;
  padding: 9px 16px; border-radius: 10px; border: none;
  background: rgba(59,130,246,0.18); color: #60a5fa;
  cursor: pointer; transition: background 0.2s, color 0.2s;
  font-weight: 700;
}
.login-send-code:hover { background: rgba(59,130,246,0.3); color: #93c5fd; }
.login-box .login-submit {
  font-family: var(--font-ui); font-size: 15px; font-weight: 600;
  width: 100%; padding: 16px; margin-top: 10px;
  background: linear-gradient(135deg, #4f6ef7 0%, #6366f1 50%, #8b5cf6 100%);
  border: none; border-radius: 14px; color: #fff; cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s;
  box-shadow: 0 4px 24px rgba(99,102,241,0.2), 0 0 0 1px rgba(139,92,246,0.15) inset;
  letter-spacing: 3px; text-transform: uppercase;
}
.login-box .login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,102,241,0.3), 0 0 0 1px rgba(139,92,246,0.2) inset;
}
.login-box .login-submit:active { transform: scale(0.98); }
.login-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 28px 0 20px; color: rgba(255,255,255,0.12); font-size: 11px;
  text-transform: uppercase; letter-spacing: 3px; font-weight: 300;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 0.5px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}
.login-social-btn {
  width: 100%; padding: 15px 20px; margin-bottom: 10px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.5);
  font-family: var(--font-ui); font-size: 14px; font-weight: 400;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}
.login-social-btn:hover {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8); transform: translateY(-1px);
}
.login-social-btn .social-brand {
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 2px;
  color: rgba(255,255,255,0.65);
}
.login-footer {
  margin-top: 22px; font-size: 11px; color: rgba(255,255,255,0.2); font-weight: 300;
}
.login-footer a { color: #60a5fa; text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }
/* Step 2: Verification code */
.login-step { transition: opacity 0.35s, transform 0.35s cubic-bezier(0.25, 1, 0.5, 1); }
.login-step.hidden { display: none; }
.login-step.slide-in {
  animation: stepSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes stepSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}
.login-back {
  position: absolute; top: 20px; left: 20px;
  background: none; border: none; color: rgba(255,255,255,0.3);
  font-size: 18px; cursor: pointer; padding: 8px;
  transition: color 0.2s;
}
.login-back:hover { color: rgba(255,255,255,0.6); }
.login-code-hint {
  font-size: 13px; color: rgba(255,255,255,0.3); margin-bottom: 24px; font-weight: 300;
}
.login-code-hint span { color: #60a5fa; }
/* Badges */
.login-badges {
  display: flex; justify-content: center; gap: 44px; margin-top: 40px;
}
.login-badge {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.login-badge-icon {
  font-size: 18px; color: rgba(99,130,246,0.7);
  filter: drop-shadow(0 0 6px rgba(59,130,246,0.3));
}
.login-badge-text {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 2px;
  color: rgba(255,255,255,0.35); text-transform: uppercase;
}

/* Welcome bubble */

/* ============================================================
   Dream tab interaction modals (V1.2.2)
   - mount-modal: pick bots to mount a dream onto
   - team-modal: spawn a team of N bots running this dream
   - dpick-modal: pick which dream to upload as inception template
============================================================ */
#mount-modal, #team-modal, #dpick-modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1090;
  display: none;
  align-items: center; justify-content: center;
}
#mount-modal.active, #team-modal.active, #dpick-modal.active { display: flex; }
.dim-box {
  width: min(560px, 92vw);
  max-height: 85vh;
  background: #1a1830;
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.dim-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(38, 35, 58, 0.6);
}
.dim-h-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  border: 2px solid;
  flex-shrink: 0;
}
.dim-h-info { flex: 1; min-width: 0; }
.dim-h-title {
  font-family: var(--font-pixel);
  font-size: 11px; font-weight: 400; letter-spacing: 0.8px;
  color: var(--accent-gold);
  margin-bottom: 6px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}
.dim-h-title::before { content: '['; color: var(--brand-light); margin-right: 4px; }
.dim-h-title::after { content: ']'; color: var(--brand-light); margin-left: 4px; }
.dim-h-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.dim-close {
  background: transparent; border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 0 6px;
}
.dim-close:hover { color: var(--text); }
.dim-body {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
}
.dim-foot {
  display: flex; gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: rgba(38, 35, 58, 0.4);
}
.dim-foot-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 7px;
  font-family: var(--font-pixel);
  font-size: 9px; font-weight: 400; letter-spacing: 0.6px;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, background 0.14s;
  border: 2px solid var(--border);
  background: rgba(20, 18, 36, 0.55);
  color: var(--text-muted);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45);
}
.dim-foot-btn:hover { color: var(--text); border-color: var(--brand-light); }
.dim-foot-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.45); }
.dim-foot-btn.primary {
  background: var(--accent-pink);
  color: #fff;
  border-color: #c43d8e;
  box-shadow: 0 3px 0 rgba(150, 50, 105, 0.7);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}
.dim-foot-btn.primary:hover { background: #f580c0; }
.dim-foot-btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(150, 50, 105, 0.7); }
.dim-foot-btn.primary:disabled {
  opacity: 0.45; cursor: not-allowed;
  background: rgba(244, 114, 182, 0.45);
  transform: none;
  box-shadow: 0 3px 0 rgba(150, 50, 105, 0.3);
}

/* team-picker (tp-) — Lark-style two-pane create-team modal */
#team-modal .dim-box { width: 880px; max-width: 95vw; max-height: 88vh; }
#team-modal .dim-body { padding: 0; }
.tp-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px 18px 18px;
  min-height: 0;
}
.tp-pane {
  display: flex; flex-direction: column;
  background: rgba(20, 18, 36, 0.45);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  min-height: 460px; max-height: 56vh;
  overflow: hidden;
}
.tp-pane-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tp-search-wrap {
  position: relative;
}
.tp-search-icon {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted); font-size: 13px;
  pointer-events: none;
}
.tp-search {
  font-family: var(--font-ui);
  font-size: 13px; width: 100%;
  padding: 9px 12px 9px 32px;
  background: rgba(14, 12, 28, 0.7);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: #fff; outline: none;
}
.tp-search:focus { border-color: var(--brand); }
.tp-search::placeholder { color: var(--text-muted); }
.tp-pane-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 10px 14px 6px;
  flex-shrink: 0;
}
.tp-list { flex: 1; overflow-y: auto; padding: 4px 8px 8px; }
.tp-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  background: rgba(38, 35, 58, 0.35);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  cursor: pointer; transition: all 0.14s;
  margin-bottom: 6px;
}
.tp-row:hover {
  border-color: var(--brand-light);
  background: rgba(129, 140, 248, 0.08);
}
.tp-row.checked {
  border-color: var(--accent-pink);
  background: rgba(244, 114, 182, 0.08);
}
.tp-av {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(14, 12, 28, 0.6);
  border: 1px solid var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  image-rendering: pixelated;
}
.tp-av canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  width: 28px; height: 28px;
}
.tp-info { flex: 1; min-width: 0; }
.tp-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 2px;
}
.tp-desc {
  font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tp-action {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: rgba(14, 12, 28, 0.5);
  color: var(--text-muted); font-size: 14px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.14s;
}
.tp-row:hover .tp-action { color: var(--brand-light); border-color: var(--brand-light); }
.tp-row.checked .tp-action {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  color: #fff;
}
.tp-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; color: var(--text-muted);
  font-size: 12px; padding: 28px; line-height: 1.7;
}
.tp-empty-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.6; }
.tp-tl-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  padding: 3px 8px; border-radius: 6px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: rgba(14, 12, 28, 0.5);
  cursor: pointer; transition: all 0.14s;
  flex-shrink: 0;
}
.tp-tl-badge:hover { color: var(--brand-light); border-color: var(--brand-light); }
.tp-tl-badge.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
}
.tp-remove {
  width: 26px; height: 26px; flex-shrink: 0;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.tp-remove:hover { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.tp-name-block {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
}
.tp-name-label-inline {
  font-size: 12px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
.tp-name-label-inline .req { color: var(--accent-pink); }
.tp-name-input {
  font-family: var(--font-ui);
  font-size: 13px; flex: 1; min-width: 0;
  padding: 9px 12px;
  background: rgba(14, 12, 28, 0.7);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: #fff; outline: none;
}
.tp-name-input:focus { border-color: var(--brand); }
.tp-name-input::placeholder { color: var(--text-muted); }

/* mount-modal bot list */
.mt-list { display: flex; flex-direction: column; gap: 8px; }
.mt-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.14s;
}
.mt-row:hover {
  border-color: var(--brand-light);
  background: rgba(129, 140, 248, 0.08);
}
.mt-row.checked {
  border-color: var(--accent-pink);
  background: rgba(244, 114, 182, 0.10);
}
.mt-check {
  width: 18px; height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.mt-row.checked .mt-check {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
}
.mt-radio {
  width: 18px; height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent-pink);
  font-size: 10px;
}
.mt-row.checked .mt-radio {
  border-color: var(--accent-pink);
  color: var(--accent-pink);
}
.mt-avatar {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: rgba(129, 140, 248, 0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.mt-avatar canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.mt-info { flex: 1; min-width: 0; }
.mt-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 7px;
}
.mt-tag {
  font-family: var(--font-pixel);
  font-size: 8px; letter-spacing: 0.4px;
  padding: 2px 5px; border-radius: 3px;
  background: rgba(129, 140, 248, 0.18);
  color: var(--brand-light);
  border: 1px solid rgba(129, 140, 248, 0.35);
}
.mt-tag.hired {
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.35);
}
.mt-tag.busy {
  background: rgba(244, 114, 182, 0.15);
  color: var(--accent-pink);
  border-color: rgba(244, 114, 182, 0.35);
}
.mt-meta { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.mt-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  background: rgba(38, 35, 58, 0.4);
  border: 1.5px dashed var(--border);
  border-radius: 9px;
}
.mt-section-label {
  font-family: var(--font-pixel);
  font-size: 9px; letter-spacing: 0.7px;
  color: var(--accent-gold);
  margin: 12px 0 6px;
}
.mt-section-label:first-child { margin-top: 0; }

/* team-modal form */
.tm-form { display: flex; flex-direction: column; gap: 14px; }
.tm-field { display: flex; flex-direction: column; gap: 6px; }
.tm-label {
  font-family: var(--font-pixel);
  font-size: 9px; letter-spacing: 0.6px;
  color: var(--accent-gold);
}
.tm-input, .tm-textarea {
  background: rgba(20, 18, 36, 0.7);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12.5px;
  outline: none;
  transition: border 0.14s;
}
.tm-input:focus, .tm-textarea:focus { border-color: var(--brand-light); }
.tm-textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
.tm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tm-stepper {
  display: flex; align-items: center;
  background: rgba(20, 18, 36, 0.7);
  border: 1.5px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  width: fit-content;
}
.tm-step-btn {
  width: 30px; height: 32px;
  background: transparent;
  border: none;
  color: var(--brand-light);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.tm-step-btn:hover { background: rgba(129, 140, 248, 0.15); }
.tm-step-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.tm-step-val {
  width: 40px;
  text-align: center;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}
.tm-preview {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 12px 10px 10px;
  background:
    linear-gradient(rgba(20, 18, 36, 0.4), rgba(20, 18, 36, 0.4)),
    repeating-linear-gradient(
      45deg,
      rgba(129, 140, 248, 0.05) 0,
      rgba(129, 140, 248, 0.05) 2px,
      transparent 2px,
      transparent 4px
    );
  border: 2px solid var(--border);
  border-radius: 7px;
  min-height: 64px;
  align-items: flex-start;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.35);
}
.tm-preview-bot {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  width: 56px;
}
.tm-preview-bot canvas {
  width: 32px; height: 32px;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  border: 2px solid var(--brand-light);
  border-radius: 4px;
  background: #1e1b2e;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
.tm-preview-name {
  font-family: var(--font-pixel);
  font-size: 6px; letter-spacing: 0.3px;
  color: var(--text);
  text-align: center;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
}
.tm-preview-empty {
  font-family: var(--font-pixel);
  font-size: 8px; letter-spacing: 0.6px;
  color: var(--text-muted);
  padding: 12px 6px;
  width: 100%;
  text-align: center;
}

/* dpick-modal: dream picker for upload */
.dpk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.dpk-card {
  display: flex; gap: 9px; align-items: center;
  padding: 10px;
  background: rgba(38, 35, 58, 0.5);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.14s;
}
.dpk-card:hover {
  border-color: var(--brand-light);
  background: rgba(129, 140, 248, 0.08);
}
.dpk-card.selected {
  border-color: var(--accent-pink);
  background: rgba(244, 114, 182, 0.10);
}
.dpk-avatar {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 2px solid;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.dpk-info { flex: 1; min-width: 0; }
.dpk-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.dpk-role { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }

/* ========= RENTALS VIEW ========= */
#rentals-view {
  display: none;
  position: fixed; inset: 0;
  background: var(--bg-dark);
  z-index: 50;
  padding-top: 56px;
  flex-direction: row;
  overflow: hidden;
}
#rentals-view.active { display: flex; }

/* ----- LEFT SIDEBAR : earnings goal & stats ----- */
.rv-aside {
  width: 300px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: rgba(30, 27, 46, 0.6);
  overflow-y: auto;
  padding: 22px 18px 24px;
  display: flex; flex-direction: column; gap: 18px;
}
.rv-aside-section { display: flex; flex-direction: column; gap: 10px; }
.rv-aside-label {
  font-family: var(--font-pixel);
  font-size: 8px; letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.rv-goal-card {
  background:
    radial-gradient(ellipse at top right, rgba(45,212,191,0.18), transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(45,212,191,0.3);
  border-radius: 12px;
  padding: 16px 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
}
.rv-goal-head {
  display: flex; align-items: baseline; justify-content: space-between;
}
.rv-goal-month {
  font-size: 11.5px; color: var(--text-dim);
}
.rv-goal-edit {
  font-size: 10px; font-family: var(--font-pixel);
  color: var(--accent-teal); cursor: pointer;
  padding: 3px 6px; border: 1px solid rgba(45,212,191,0.35);
  border-radius: 4px; background: rgba(45,212,191,0.06);
  transition: all 0.15s; letter-spacing: 0.5px;
}
.rv-goal-edit:hover { background: rgba(45,212,191,0.15); color: #fff; }
.rv-goal-amount {
  font-size: 28px; font-weight: 800; color: var(--accent-teal);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.rv-goal-of {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
  margin-top: 2px;
}
.rv-goal-of b { color: var(--text-dim); font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-goal-bar {
  height: 8px; background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden; margin-top: 4px;
}
.rv-goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal), var(--brand-light));
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
}
.rv-goal-bar-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: rvGoalShine 2.4s linear infinite;
}
@keyframes rvGoalShine {
  from { transform: translateX(-100%); } to { transform: translateX(100%); }
}
.rv-goal-meta {
  display: flex; justify-content: space-between;
  font-size: 10.5px; color: var(--text-muted);
}
.rv-goal-meta .rv-gm-pct { color: var(--accent-teal); font-weight: 700; font-family: var(--font-pixel); font-size: 10px; }
.rv-goal-foot {
  font-size: 11px; color: var(--text-dim); margin-top: 4px;
  padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; gap: 5px;
}
.rv-goal-foot b { color: #fff; font-variant-numeric: tabular-nums; font-weight: 700; }

.rv-mini-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.rv-mini-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.rv-mini-stat-label {
  font-family: var(--font-pixel); font-size: 7px; letter-spacing: 0.6px;
  color: var(--text-muted); text-transform: uppercase;
}
.rv-mini-stat-value { font-size: 16px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rv-mini-stat-value.money { color: var(--accent-teal); }
.rv-mini-stat-sub { font-size: 10px; color: var(--text-muted); }

/* Wallet card */
.rv-wallet-card {
  background:
    radial-gradient(ellipse at top right, rgba(99,102,241,0.22), transparent 60%),
    var(--bg-card);
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 12px;
  padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden;
}
.rv-wallet-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rv-wallet-label {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: 0.8px;
  color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px;
}
.rv-wallet-balance {
  font-size: 26px; font-weight: 800; color: var(--brand-light);
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.rv-wallet-pending { text-align: right; padding-top: 2px; }
.rv-wallet-pending-label { font-size: 9.5px; color: var(--text-muted); margin-bottom: 2px; }
.rv-wallet-pending-val { font-size: 13px; font-weight: 700; color: var(--accent-gold); font-variant-numeric: tabular-nums; }
.rv-wallet-actions { display: flex; gap: 8px; }
.rv-wallet-btn {
  flex: 1; font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.8px;
  padding: 9px 0; border-radius: 6px; cursor: pointer;
  transition: all 0.15s;
}
.rv-wallet-btn.deposit { background: rgba(45,212,191,0.12); border: 1px solid rgba(45,212,191,0.4); color: var(--accent-teal); }
.rv-wallet-btn.deposit:hover { background: rgba(45,212,191,0.25); color: #fff; }
.rv-wallet-btn.withdraw { background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.4); color: var(--brand-light); }
.rv-wallet-btn.withdraw:hover { background: rgba(99,102,241,0.25); color: #fff; }
.rv-wallet-tx-btn {
  width: 100%; padding: 8px 0; margin-top: 2px;
  background: transparent; border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 6px; cursor: pointer;
  font-size: 11.5px; color: var(--text-dim);
  transition: all 0.15s;
}
.rv-wallet-tx-btn:hover { border-color: var(--brand); color: #fff; background: rgba(99,102,241,0.08); }

/* Right-side primary tabs (我的 / 已租) */
.rv-tabs-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 24px 32px 0;
  margin-bottom: 14px;
}
.rv-tabs {
  display: flex; gap: 4px;
  background: rgba(0,0,0,0.18); padding: 4px;
  border-radius: 10px; border: 1px solid var(--border);
  width: fit-content;
}
.rv-tab {
  padding: 8px 16px; border-radius: 7px;
  font-size: 13px; font-weight: 600;
  color: var(--text-dim); cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.rv-tab:hover { color: #fff; }
.rv-tab.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent-pink) 100%);
  color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}
.rv-tab-cnt {
  font-family: var(--font-pixel); font-size: 8px;
  background: rgba(255,255,255,0.12); padding: 2px 5px; border-radius: 4px;
}
.rv-tab.active .rv-tab-cnt { background: rgba(255,255,255,0.22); }

/* Page header (replaces tab bar in split mode) */
.rv-page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 32px 0; margin-bottom: 14px;
}
.rv-page-title {
  font-size: 18px; font-weight: 700; color: #fff;
  letter-spacing: 0.3px;
}

/* Hired-agent card variant */
.rv-card.hired { border-color: rgba(45,212,191,0.3); }
.rv-card.hired::before { background: linear-gradient(180deg, var(--accent-teal), var(--brand)); }
.rv-card-owner {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
}
.rv-card-owner b { color: var(--text-dim); font-weight: 600; }
.rv-spent-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 11.5px; color: var(--text-dim);
  border-top: 1px dashed rgba(255,255,255,0.06);
  border-bottom: 1px dashed rgba(255,255,255,0.06);
  margin: 6px 0;
}
.rv-spent-row b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Dream-binding row on hired card (Step 3) */
.rv-dream-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 7px 10px; margin: 0 0 6px 0;
  border-radius: 8px; font-size: 11.5px;
}
.rv-dream-row.has-dream {
  background: rgba(167,139,250,0.08);
  border: 1px solid rgba(167,139,250,0.25);
  color: var(--text-dim);
}
.rv-dream-row.has-dream b { font-weight: 700; }
.rv-dream-row.no-dream {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.14);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.rv-dream-row.no-dream:hover {
  border-color: rgba(167,139,250,0.5);
  color: #a78bfa;
  background: rgba(167,139,250,0.06);
}
.rv-dream-switch-link {
  color: #a78bfa; cursor: pointer; font-weight: 600;
  text-decoration: none; font-size: 11px;
  padding: 2px 6px; border-radius: 4px;
  transition: background 0.15s;
}
.rv-dream-switch-link:hover { background: rgba(167,139,250,0.18); }

/* assign-dream picker modal */
#assign-dream-modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7); align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
#assign-dream-modal.active { display: flex; }
#assign-dream-modal .dim-box { width: 520px; max-width: 95vw; max-height: 88vh; }
.adm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: all 0.15s;
  background: rgba(255,255,255,0.02);
}
.adm-row:hover { border-color: rgba(167,139,250,0.4); background: rgba(167,139,250,0.05); }
.adm-row.selected {
  border-color: #a78bfa;
  background: rgba(167,139,250,0.12);
  box-shadow: 0 0 0 1px rgba(167,139,250,0.4);
}
.adm-row.draft { opacity: 0.55; }
.adm-avatar {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; border: 2px solid;
}
.adm-info { flex: 1; min-width: 0; }
.adm-name { font-weight: 700; font-size: 13.5px; color: var(--text); }
.adm-name .adm-current-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: rgba(45,212,191,0.18); color: var(--accent-teal);
  font-size: 9.5px; border-radius: 4px; font-weight: 600;
  vertical-align: middle;
}
.adm-tagline {
  font-size: 11px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}
.adm-checkbox {
  width: 18px; height: 18px; border-radius: 5px;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; font-size: 11px; color: transparent;
}
.adm-row.selected .adm-checkbox {
  border-color: #a78bfa; background: #a78bfa; color: #fff;
}
.adm-dream-count {
  display: inline-block; margin-left: 8px; padding: 1px 8px;
  background: rgba(167,139,250,0.2); color: #a78bfa;
  font-size: 11px; border-radius: 10px; font-weight: 600;
}

/* ============================================================
   Step 4 — Chat panel (group + 1:1 dream conversations)
   V1.2.4 — inline pane inside .dream-im-main (Lark 双栏)
   ============================================================ */
#chat-panel {
  flex: 1;
  display: none;
  flex-direction: column;
  background: var(--bg-dark);
  min-width: 0;
  min-height: 0;
}
#chat-panel.active { display: flex; }
.cp-head {
  flex-shrink: 0; height: 64px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(38,35,58,0.6);
}
.cp-title-block { flex: 1; min-width: 0; }
.cp-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.cp-title-icon { font-size: 18px; }
.cp-sub {
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-members {
  display: flex; align-items: center; gap: 6px;
}
.cp-member-stack { display: flex; flex-direction: row-reverse; }
.cp-member-stack .cp-mem-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--bg-dark);
  margin-right: -10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  position: relative;
}
.cp-member-stack .cp-mem-avatar.tl::after {
  content: 'TL';
  position: absolute; bottom: -2px; right: -4px;
  font-size: 8px; font-weight: 700;
  background: var(--brand); color: #fff;
  padding: 1px 3px; border-radius: 3px;
  border: 1.5px solid var(--bg-dark);
  font-family: var(--font-pixel);
}
.cp-mem-count {
  font-size: 11px; color: var(--text-muted); margin-left: 12px;
}
.cp-actions { display: flex; gap: 8px; }
.cp-action-btn {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-dim); cursor: pointer; font-size: 14px;
  transition: all 0.15s;
}
.cp-action-btn:hover { color: var(--text); border-color: var(--brand); background: rgba(99,102,241,0.1); }

.cp-body {
  flex: 1; overflow-y: auto;
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.cp-body::-webkit-scrollbar { width: 6px; }
.cp-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.cp-day-divider {
  text-align: center;
  font-size: 10.5px; color: var(--text-muted);
  margin: 4px 0;
  font-family: var(--font-pixel);
  letter-spacing: 0.5px;
}
.cp-system-msg {
  text-align: center;
  font-size: 11.5px; color: var(--text-muted);
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  align-self: center;
  max-width: 80%;
}

.cp-msg {
  display: flex; gap: 10px;
  max-width: 78%;
}
.cp-msg.self { align-self: flex-end; flex-direction: row-reverse; }
.cp-msg-avatar {
  width: 36px; height: 36px; border-radius: 10px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; border: 2px solid;
}
.cp-msg-content { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-msg.self .cp-msg-content { align-items: flex-end; }
.cp-msg-meta {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.cp-msg-name { font-weight: 700; color: var(--text-dim); }
.cp-msg-tl-tag {
  font-family: var(--font-pixel); font-size: 7.5px;
  background: var(--brand); color: #fff;
  padding: 2px 4px; border-radius: 3px;
}
.cp-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px; line-height: 1.5;
  word-wrap: break-word;
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}
.cp-msg.self .cp-msg-bubble {
  background: var(--brand);
  border-color: var(--brand-dark);
  color: #fff;
}
.cp-msg-bot-tag {
  font-size: 10px; color: var(--text-muted);
  margin-top: 3px; padding-left: 4px;
  font-style: italic;
}
.cp-msg-bubble h1, .cp-msg-bubble h2, .cp-msg-bubble h3,
.cp-msg-bubble h4, .cp-msg-bubble h5, .cp-msg-bubble h6 {
  margin: 12px 0 6px; font-weight: 600; color: var(--accent);
}
.cp-msg-bubble h1 { font-size: 16px; }
.cp-msg-bubble h2 { font-size: 15px; }
.cp-msg-bubble h3, .cp-msg-bubble h4, .cp-msg-bubble h5, .cp-msg-bubble h6 { font-size: 14px; }
.cp-msg-bubble p { margin: 0 0 8px; }
.cp-msg-bubble p:last-child { margin-bottom: 0; }
.cp-msg-bubble ul, .cp-msg-bubble ol { padding-left: 18px; margin: 6px 0; }
.cp-msg-bubble li { margin: 3px 0; }
.cp-msg-bubble table {
  border-collapse: collapse; margin: 8px 0; font-size: 13px;
  display: block; max-width: 100%; overflow-x: auto;
}
.cp-msg-bubble th, .cp-msg-bubble td {
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 10px; text-align: left;
}
.cp-msg-bubble th { background: rgba(255,255,255,0.06); font-weight: 600; }
.cp-msg-bubble a {
  color: #60a5fa; text-decoration: underline;
  text-underline-offset: 2px;
}
.cp-msg-bubble a:hover { color: #93c5fd; }
.cp-msg-bubble a:visited { color: #60a5fa; }
.cp-msg-bubble code {
  background: rgba(0,0,0,0.3); border-radius: 4px;
  padding: 1px 5px; font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px; color: var(--accent);
}
.cp-msg-bubble pre {
  background: rgba(0,0,0,0.35); border-radius: 8px;
  padding: 12px; overflow-x: auto; margin: 8px 0;
}
.cp-msg-bubble pre code {
  background: none; padding: 0; color: var(--text);
  font-size: 12px; white-space: pre;
}
.cp-msg-bubble blockquote {
  border-left: 3px solid rgba(255,255,255,0.2);
  padding-left: 10px; margin: 6px 0; color: var(--text-muted);
}
.cp-msg-bubble hr {
  border: none; border-top: 1px solid rgba(255,255,255,0.15);
  margin: 8px 0;
}

/* Chat image styles */
.cp-img-preview {
  max-width: 120px; max-height: 80px;
  border-radius: 6px; margin: 4px 2px;
  vertical-align: middle; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.1);
}
.cp-img-uploading {
  display: inline-block; padding: 6px 12px;
  background: rgba(124,131,255,0.15); border-radius: 6px;
  font-size: 11px; color: var(--text-muted);
  margin: 4px 2px;
}
.cp-msg-image {
  max-width: 300px; max-height: 240px;
  border-radius: 8px; margin-top: 6px;
  cursor: pointer; display: block;
  border: 1px solid rgba(255,255,255,0.08);
  transition: opacity 0.15s;
}
.cp-msg-image:hover { opacity: 0.85; }
.cp-lightbox {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.85);
  display: none; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.cp-lightbox.active { display: flex; }
.cp-lightbox img {
  max-width: 90vw; max-height: 90vh;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.cp-typing {
  display: flex; gap: 10px; max-width: 60%;
  align-items: center;
}
.cp-typing-dots {
  display: flex; gap: 4px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
}
.cp-typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-muted);
  animation: cp-typing-bounce 1.2s infinite ease-in-out;
}
.cp-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.cp-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cp-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.cp-foot {
  flex-shrink: 0;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  background: rgba(38,35,58,0.6);
}
.cp-input-wrap {
  display: flex; align-items: flex-end; gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 10px 8px 14px;
  transition: border-color 0.15s;
}
.cp-input-wrap:focus-within { border-color: var(--brand); }
.cp-input {
  flex: 1; min-height: 24px; max-height: 120px;
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--font-ui);
  font-size: 14px; line-height: 1.5;
  padding: 4px 0; overflow-y: auto;
  white-space: pre-wrap; word-break: break-word;
}
.cp-input:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted); pointer-events: none;
}
.cp-input .cp-at-tag {
  color: var(--accent); font-weight: 600;
}
.cp-mention-hint {
  font-size: 10.5px; color: var(--text-muted);
  margin-top: 6px; padding-left: 4px;
}
.cp-send-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: none; background: var(--brand);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  transition: all 0.15s;
}
.cp-send-btn:hover { background: var(--brand-light); }
.cp-send-btn:disabled {
  background: var(--border); cursor: not-allowed;
  color: var(--text-muted);
}
.cp-stop-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: none; background: var(--danger, #e74c3c);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  transition: all 0.15s;
}
.cp-stop-btn:hover { background: #c0392b; }
.cp-stop-btn:disabled { background: var(--border); cursor: not-allowed; color: var(--text-muted); }

/* ===== Model / Agent Selector ===== */
.cp-toolbar {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; padding: 0 2px;
}
.cp-model-wrap { position: relative; }
.cp-model-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.cp-model-btn:hover {
  border-color: var(--brand);
  color: var(--text);
  background: rgba(99,102,241,0.08);
}
.cp-model-icon { font-size: 13px; }
.cp-model-arrow { font-size: 10px; opacity: 0.6; }
.cp-model-panel {
  position: absolute;
  bottom: calc(100% + 8px); left: 0;
  width: 320px; max-height: 420px;
  overflow-y: auto;
  background: var(--surface, #1e1b2e);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.5);
  z-index: 100; padding: 12px 0;
}
.cp-mp-title {
  padding: 4px 16px 10px;
  font-size: 13px; font-weight: 700; color: var(--text);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.cp-mp-section { padding: 4px 0; }
.cp-mp-section-label {
  padding: 8px 16px 4px;
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.cp-mp-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  cursor: pointer; transition: background 0.12s;
}
.cp-mp-option:hover { background: rgba(99,102,241,0.08); }
.cp-mp-option.selected { background: rgba(99,102,241,0.1); }
.cp-mp-opt-info { flex: 1; min-width: 0; }
.cp-mp-opt-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.cp-mp-opt-desc {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-mp-check {
  color: var(--brand-light);
  font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.cp-mp-badge {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px;
  line-height: 1.6;
}
.cp-mp-badge.low { background: rgba(52,211,153,0.15); color: #34d399; }
.cp-mp-badge.mid { background: rgba(96,165,250,0.15); color: #60a5fa; }
.cp-mp-badge.high { background: rgba(251,191,36,0.15); color: #fbbf24; }
.cp-mp-badge.ultra { background: rgba(244,114,182,0.15); color: #f472b6; }
.cp-mp-badge.online { background: rgba(52,211,153,0.15); color: #34d399; }
.cp-mp-badge.offline { background: rgba(156,163,175,0.15); color: #9ca3af; }
.cp-mp-empty {
  padding: 16px;
  text-align: center;
  font-size: 11px; color: var(--text-muted);
}

/* Transaction list */
.rv-tx-list {
  display: flex; flex-direction: column;
  background: rgba(0,0,0,0.18); border-radius: 10px;
  border: 1px solid var(--border); overflow: hidden;
}
.rv-tx-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.rv-tx-item:last-child { border-bottom: none; }
.rv-tx-icon {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.rv-tx-icon.rent_in { background: rgba(45,212,191,0.15); color: var(--accent-teal); }
.rv-tx-icon.withdraw { background: rgba(251,191,36,0.15); color: var(--accent-gold); }
.rv-tx-icon.deposit { background: rgba(167,139,250,0.18); color: var(--accent-violet); }
.rv-tx-info { flex: 1; min-width: 0; }
.rv-tx-label { font-size: 12px; color: var(--text); font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-tx-time { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.rv-tx-amount { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.rv-tx-amount.in { color: var(--accent-teal); }
.rv-tx-amount.out { color: var(--accent-gold); }
.rv-tx-all {
  background: transparent; border: none;
  color: var(--text-muted); font-size: 11px; cursor: pointer;
  padding: 6px 0; align-self: flex-end; transition: color 0.15s;
}
.rv-tx-all:hover { color: var(--brand-light); }

/* ===== Fund Flow / Transactions full page ===== */
#tx-view {
  display: none;
  position: fixed; inset: 0; z-index: 55;
  padding-top: 56px;
  background: var(--bg-dark);
  flex-direction: column;
  overflow: hidden;
}
#tx-view.active { display: flex; }
.tx-topbar {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(30, 27, 46, 0.6);
}
.tx-topbar-left { display: flex; align-items: center; gap: 12px; }
.tx-back-btn {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.tx-back-btn:hover { border-color: var(--brand); color: #fff; }
.tx-page-title { font-size: 18px; font-weight: 700; color: #fff; }
.tx-body {
  flex: 1; overflow-y: auto;
  padding: 24px 32px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
/* Summary strip */
.tx-summary-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.tx-summary-box {
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.tx-summary-box .tx-sb-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.tx-summary-box .tx-sb-val {
  font-size: 22px; font-weight: 800;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.tx-summary-box.balance .tx-sb-val { color: var(--brand-light); }
.tx-summary-box.income .tx-sb-val { color: var(--accent-teal); }
.tx-summary-box.expense .tx-sb-val { color: var(--accent-gold); }
.tx-summary-box.pending .tx-sb-val { color: var(--accent-violet); }
.tx-summary-box .tx-sb-sub {
  font-size: 10px; color: var(--text-muted); margin-top: 1px;
}
/* Filter bar */
.tx-filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.tx-filter-pills {
  display: flex; gap: 4px;
  background: rgba(0,0,0,0.18); padding: 3px;
  border-radius: 8px; border: 1px solid var(--border);
}
.tx-pill {
  padding: 6px 14px; border-radius: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.tx-pill:hover { color: #fff; }
.tx-pill.active {
  background: var(--brand); color: #fff;
  box-shadow: 0 1px 6px rgba(99,102,241,0.3);
}
.tx-pill .tx-pill-cnt {
  font-family: var(--font-pixel); font-size: 8px;
  background: rgba(255,255,255,0.12); padding: 2px 5px; border-radius: 4px;
}
.tx-pill.active .tx-pill-cnt { background: rgba(255,255,255,0.22); }
.tx-date-range {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.tx-date-input {
  background: rgba(0,0,0,0.25); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 10px;
  color: var(--text); font-family: var(--font-ui); font-size: 12px;
  outline: none; transition: border-color 0.15s;
}
.tx-date-input:focus { border-color: var(--brand); }
.tx-date-sep { color: var(--text-muted); font-size: 12px; }
/* Table */
.tx-table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.tx-table th {
  text-align: left;
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 0.5px; text-transform: uppercase;
  padding: 10px 14px;
  background: rgba(0,0,0,0.15);
  border-bottom: 1px solid var(--border);
}
.tx-table td {
  padding: 12px 14px;
  font-size: 13px; color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}
.tx-table tbody tr:last-child td { border-bottom: none; }
.tx-table tbody tr:hover { background: rgba(99,102,241,0.04); }
.tx-type-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 5px;
  font-size: 11px; font-weight: 700;
}
.tx-type-badge.rent-income {
  background: rgba(45,212,191,0.12); color: var(--accent-teal);
  border: 1px solid rgba(45,212,191,0.3);
}
.tx-type-badge.rent-expense {
  background: rgba(251,191,36,0.12); color: var(--accent-gold);
  border: 1px solid rgba(251,191,36,0.3);
}
.tx-type-badge.deposit {
  background: rgba(167,139,250,0.12); color: var(--accent-violet);
  border: 1px solid rgba(167,139,250,0.3);
}
.tx-type-badge.withdraw {
  background: rgba(244,114,182,0.12); color: var(--accent-pink);
  border: 1px solid rgba(244,114,182,0.3);
}
.tx-type-badge.refund {
  background: rgba(99,102,241,0.12); color: var(--brand-light);
  border: 1px solid rgba(99,102,241,0.3);
}
.tx-amount-cell { font-weight: 700; font-variant-numeric: tabular-nums; }
.tx-amount-cell.positive { color: var(--accent-teal); }
.tx-amount-cell.negative { color: var(--accent-gold); }
.tx-status-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 5px;
}
.tx-status-dot.completed { background: var(--accent-teal); }
.tx-status-dot.pending { background: var(--accent-gold); }
.tx-status-dot.failed { background: #ef4444; }
.tx-memo { color: var(--text-muted); font-size: 11px; }
.tx-pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
}
.tx-page-info { font-size: 12px; color: var(--text-muted); }
.tx-page-btns { display: flex; gap: 4px; }
.tx-page-btn {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.18); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.tx-page-btn:hover { border-color: var(--brand); color: #fff; }
.tx-page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tx-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Cumulative summary cards (earned / spent totals) */
.rv-summary-card {
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
}
.rv-summary-card.earned {
  background:
    radial-gradient(ellipse at top right, rgba(45,212,191,0.16), transparent 65%),
    rgba(0,0,0,0.18);
  border-color: rgba(45,212,191,0.3);
}
.rv-summary-card.spent {
  background:
    radial-gradient(ellipse at top right, rgba(251,191,36,0.14), transparent 65%),
    rgba(0,0,0,0.18);
  border-color: rgba(251,191,36,0.3);
}
.rv-summary-amount {
  font-size: 24px; font-weight: 800;
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.rv-summary-card.earned .rv-summary-amount { color: var(--accent-teal); }
.rv-summary-card.spent  .rv-summary-amount { color: var(--accent-gold); }
.rv-summary-sub {
  font-size: 10.5px; color: var(--text-muted);
  margin-top: -2px;
}
.rv-summary-meta {
  display: flex; align-items: stretch;
  margin-top: 8px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.rv-summary-meta-item {
  flex: 1; display: flex; flex-direction: column; gap: 3px;
}
.rv-summary-meta-divider {
  width: 1px; background: rgba(255,255,255,0.06);
  margin: 0 12px;
}
.rv-sm-label {
  font-family: var(--font-pixel); font-size: 7px;
  letter-spacing: 0.6px; color: var(--text-muted);
  text-transform: uppercase;
}
.rv-sm-value {
  font-size: 13px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Status filter pills (moved to right side header) */
.rv-filter-pills {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 32px 14px;
}
.rv-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; transition: all 0.15s;
}
.rv-pill:hover { color: #fff; background: rgba(255,255,255,0.07); }
.rv-pill.active { background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.45); color: #fff; }
.rv-pill-dot { width: 7px; height: 7px; border-radius: 50%; }
.rv-pill-dot.unlisted { background: #6b7280; }
.rv-pill-dot.listed   { background: var(--brand-light); }
.rv-pill-dot.pending  { background: var(--accent-gold); }
.rv-pill-dot.rented   { background: var(--accent-violet); }
.rv-pill-dot.all      { background: linear-gradient(135deg, var(--brand), var(--accent-pink)); }
.rv-pill-cnt {
  font-family: var(--font-pixel); font-size: 8px;
  background: rgba(255,255,255,0.08); padding: 2px 5px; border-radius: 4px;
  margin-left: 2px;
}
.rv-pill.active .rv-pill-cnt { background: rgba(255,255,255,0.2); color: #fff; }

.rv-status-list {
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(0,0,0,0.18); border-radius: 10px;
  padding: 10px 6px;
  border: 1px solid var(--border);
}
.rv-status-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--text-dim); cursor: pointer;
  transition: all 0.15s;
}
.rv-status-row:hover { background: rgba(255,255,255,0.04); color: #fff; }
.rv-status-row.active { background: rgba(99,102,241,0.15); color: #fff; }
.rv-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.rv-status-dot.unlisted { background: #6b7280; }
.rv-status-dot.listed   { background: var(--brand-light); }
.rv-status-dot.pending  { background: var(--accent-gold); }
.rv-status-dot.rented   { background: var(--accent-violet); }
.rv-status-dot.all      { background: linear-gradient(135deg, var(--brand), var(--accent-pink)); }
.rv-status-row .rv-sr-label { flex: 1; }
.rv-status-row .rv-sr-cnt {
  font-family: var(--font-pixel); font-size: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim); padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.3px;
}
.rv-status-row.active .rv-sr-cnt { background: rgba(99,102,241,0.25); color: #fff; border-color: transparent; }

/* ----- RIGHT MAIN ----- */
.rv-main {
  flex: 1; min-width: 0;
  overflow-y: auto;
  display: flex; flex-direction: column;
}

.rv-header {
  padding: 22px 32px 16px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at top left, rgba(99,102,241,0.10), transparent 60%),
    radial-gradient(ellipse at top right, rgba(244,114,182,0.08), transparent 55%);
}
.rv-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rv-title-block { display: flex; flex-direction: column; gap: 4px; }
.rv-title {
  font-size: 22px; font-weight: 800; color: #fff;
  letter-spacing: 0.2px;
  display: flex; align-items: center; gap: 10px;
}
.rv-title .rv-mark {
  font-family: var(--font-pixel);
  font-size: 9px; letter-spacing: 1px;
  color: var(--brand-light);
  padding: 4px 7px 3px;
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: 4px; background: rgba(99,102,241,0.08);
}
.rv-tagline {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.rv-tagline .rv-dot { color: var(--accent-pink); opacity: 0.7; }

.rv-cta {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  padding: 10px 18px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent-pink));
  color: #fff; border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.rv-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(99,102,241,0.5); }

.rv-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 14px 32px 0;
}
.rv-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative; overflow: hidden;
}
.rv-stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.rv-stat-card.unlisted::before { background: #6b7280; }
.rv-stat-card.listed::before { background: var(--brand-light); }
.rv-stat-card.pending::before { background: var(--accent-gold); }
.rv-stat-card.rented::before { background: var(--accent-violet); }
.rv-stat-card.earned::before { background: var(--accent-teal); }

.rv-stat-label {
  font-family: var(--font-pixel);
  font-size: 7.5px; letter-spacing: 0.8px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.rv-stat-value {
  font-size: 22px; font-weight: 800; color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.rv-stat-value.money { color: var(--accent-teal); }
.rv-stat-sub { font-size: 10.5px; color: var(--text-dim); }

.rv-toolbar {
  padding: 14px 32px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.rv-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.rv-filter-btn {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: 18px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02);
  color: var(--text-dim); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.rv-filter-btn:hover { border-color: var(--brand); color: #fff; }
.rv-filter-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.rv-filter-btn .rv-fb-cnt {
  font-family: var(--font-pixel); font-size: 8px;
  padding: 2px 5px; border-radius: 4px;
  background: rgba(0,0,0,0.25);
}
.rv-filter-btn.active .rv-fb-cnt { background: rgba(255,255,255,0.2); }

.rv-search {
  flex: 1; max-width: 280px; min-width: 180px;
  position: relative;
}
.rv-search input {
  width: 100%; padding: 8px 12px 8px 30px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-size: 13px;
  font-family: var(--font-ui);
  outline: none; transition: border-color 0.15s;
}
.rv-search input:focus { border-color: var(--brand); }
.rv-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: 0.5; }
.rv-sort {
  font-size: 12px; color: var(--text-dim);
  padding: 8px 12px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-family: var(--font-ui);
}

.rv-grid {
  padding: 10px 32px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 14px;
}
.rv-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.rv-card:hover {
  border-color: rgba(99,102,241,0.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.rv-card[data-status="rented"]  { border-color: rgba(167,139,250,0.30); }
.rv-card[data-status="pending"] { border-color: rgba(251,191,36,0.32); }
.rv-card[data-status="unlisted"] { background: rgba(38,35,58,0.7); }

.rv-card-head { display: flex; align-items: flex-start; gap: 12px; position: relative; }
.rv-card-avatar {
  width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0;
  background: rgba(14,12,28,0.6);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 13px; font-weight: 700;
  color: #fff;
}
.rv-card-info { flex: 1; min-width: 0; padding-right: 90px; }
.rv-card-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rv-card-name { font-size: 15px; font-weight: 700; color: #fff; }
.rv-card-desc {
  font-size: 11.5px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rv-card-price {
  position: absolute; top: -2px; right: 0;
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px;
  padding: 6px 10px 5px;
  font-family: var(--font-pixel);
  line-height: 1;
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(234,88,12,0.10));
  border: 1px solid rgba(245,158,11,0.45);
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(245,158,11,0.18);
}
.rv-card-price .rv-price-amt {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-size: 18px; font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.3px;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}
.rv-card-price .rv-price-cur { font-size: 12px; opacity: 0.85; }
.rv-card-price .rv-price-unit {
  font-size: 9.5px; font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-ui);
  letter-spacing: 0.2px;
  text-shadow: none;
}
.rv-card-price.muted {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
  box-shadow: none;
  padding: 8px 12px;
}
.rv-card-price.muted .rv-price-amt {
  color: var(--text-muted);
  text-shadow: none;
  font-size: 11px;
  font-style: italic;
  font-weight: 500;
}
.rv-card-price.muted .rv-price-unit { display: none; }

.rv-status-pill {
  font-family: var(--font-pixel); font-size: 8.5px; font-weight: 700;
  padding: 3px 6px 2px; border-radius: 3px;
  letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap;
  line-height: 1;
}
.rv-status-pill.unlisted { background: rgba(107,114,128,0.15); color: #9ca3af; border: 1px solid rgba(107,114,128,0.35); }
.rv-status-pill.listed   { background: rgba(129,140,248,0.15); color: var(--brand-light); border: 1px solid rgba(129,140,248,0.4); }
.rv-status-pill.pending  { background: rgba(251,191,36,0.15);  color: var(--accent-gold);  border: 1px solid rgba(251,191,36,0.4); }
.rv-status-pill.rented   { background: rgba(167,139,250,0.18); color: var(--accent-violet);border: 1px solid rgba(167,139,250,0.45); }

.rv-card-slots {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 10px; border-radius: 7px;
  background: rgba(99,102,241,0.05);
  border: 1px dashed rgba(99,102,241,0.22);
  margin-top: -2px;
}
.rv-card-slots-label {
  font-size: 10.5px; color: var(--text-muted);
  font-weight: 600; flex-shrink: 0;
}
.rv-card-slots-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rv-card-slot-chip {
  padding: 2px 8px; border-radius: 10px;
  background: rgba(168,85,247,0.10);
  border: 1px solid rgba(168,85,247,0.25);
  font-family: var(--font-pixel);
  font-size: 10.5px; color: #d8c1ff;
  line-height: 1.4;
}
.rv-card-slots-allday {
  padding: 2px 8px; border-radius: 10px;
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.28);
  font-family: var(--font-pixel);
  font-size: 10.5px; color: #86efac;
  line-height: 1.4;
}

.rv-card-body {
  font-size: 12px; color: var(--text-dim);
  padding: 10px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  line-height: 1.5;
}
.rv-card-body.unlisted { border-style: dashed; color: var(--text-muted); }
.rv-card-body.listed   { background: rgba(129,140,248,0.05); border-color: rgba(129,140,248,0.25); }
.rv-card-body.pending  { background: rgba(251,191,36,0.05);  border-color: rgba(251,191,36,0.30); }
.rv-card-body.rented   { background: rgba(167,139,250,0.05); border-color: rgba(167,139,250,0.30); }

.rv-renter-row { display: flex; align-items: center; gap: 10px; }
.rv-renter-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-violet), var(--brand));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-pixel); font-size: 9px; color: #fff; font-weight: 700;
  flex-shrink: 0;
}
.rv-renter-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.rv-renter-meta { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }

.rv-progress { margin-top: 10px; }
.rv-progress-bar { height: 5px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.rv-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-pink));
  transition: width 0.3s;
}
.rv-progress-meta { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10px; color: var(--text-muted); }
.rv-progress-meta .rv-pm-strong { color: var(--text-dim); font-weight: 600; }

.rv-card-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.rv-act-btn {
  flex: 1; min-width: 80px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  padding: 7px 10px; border-radius: 6px;
  cursor: pointer; transition: all 0.15s;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  font-family: var(--font-ui);
}
.rv-act-btn:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: var(--brand); }
.rv-act-btn.primary {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.rv-act-btn.primary:hover { background: var(--brand-dark); }
.rv-act-btn.danger { color: #f87171; border-color: rgba(248,113,113,0.3); }
.rv-act-btn.danger:hover { background: rgba(248,113,113,0.12); color: #fca5a5; border-color: #f87171; }

.rv-card-footer {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--text-muted);
  padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.04);
}
.rv-card-footer span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.rv-card-footer .rv-cf-meta { max-width: 100%; }
.rv-card-footer .rv-cf-meta .rv-cf-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.rv-card-footer .rv-cf-val { color: var(--text-dim); font-weight: 600; }

/* Hover tooltip (0.5s delay) */
.rv-tip { position: relative; }
.rv-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #0e0c1c;
  color: #fff;
  border: 1px solid var(--accent-violet);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5);
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.rv-tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--accent-violet);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.rv-tip:hover::after, .rv-tip:hover::before {
  opacity: 1;
  visibility: visible;
  transition-delay: 0.5s;
}

.rv-rent-live {
  margin-top: 10px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(168,85,247,0.10), rgba(236,72,153,0.08));
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: 6px;
  font-size: 11px; color: var(--text-dim);
}
.rv-rent-live .rv-rl-item { display: inline-flex; align-items: center; gap: 4px; }
.rv-rent-live .rv-rl-item.earn b { color: var(--accent-gold); font-weight: 700; }
.rv-rent-live .rv-rl-item.tok b { color: var(--accent-violet); font-weight: 700; }
.rv-rent-live .rv-rl-sep { opacity: 0.4; }

.rv-card-body.rented.bottom {
  margin-top: 10px;
  padding: 10px 12px 12px;
  background: rgba(168,85,247,0.04);
  border: 1px solid rgba(168,85,247,0.18);
  border-radius: 8px;
}
.rv-rent-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.4px;
  color: var(--text-muted); text-transform: uppercase;
  margin-bottom: 8px;
}

/* ===== RV Action Modal (V1.2.3) ===== */
#rv-action-modal .pm-box { max-width: 520px; padding: 24px 26px; }
#rv-action-modal.wide .pm-box { max-width: 680px; }

.rv-am-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(168,85,247,0.18));
  border: 1px solid rgba(99,102,241,0.32);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 10px;
}
.rv-am-icon.gold { background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(234,88,12,0.18)); border-color: rgba(245,158,11,0.32); }
.rv-am-icon.danger { background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(190,18,60,0.18)); border-color: rgba(239,68,68,0.32); }
.rv-am-icon.violet { background: linear-gradient(135deg, rgba(168,85,247,0.20), rgba(236,72,153,0.18)); border-color: rgba(168,85,247,0.32); }

.rv-am-block {
  padding: 12px 14px; margin-bottom: 10px;
  background: rgba(14,12,28,0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.rv-am-block-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.rv-am-kv-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0; font-size: 12.5px;
}
.rv-am-kv-row + .rv-am-kv-row { border-top: 1px dashed rgba(255,255,255,0.05); }
.rv-am-kv-key { color: var(--text-muted); }
.rv-am-kv-val { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rv-am-kv-val.num { color: var(--accent-gold); font-family: var(--font-pixel); font-size: 13px; }

/* Contract terms list */
.rv-am-terms { font-size: 12px; color: var(--text-dim); line-height: 1.7; margin: 4px 0 0 0; padding-left: 18px; }
.rv-am-terms li { margin-bottom: 2px; }

/* Chat preview */
.rv-am-chat { max-height: 200px; overflow-y: auto; padding: 10px; background: rgba(14,12,28,0.5); border: 1px solid var(--border); border-radius: 8px; }
.rv-am-chat-msg { padding: 7px 10px; border-radius: 8px; margin-bottom: 6px; max-width: 78%; font-size: 12px; line-height: 1.4; }
.rv-am-chat-msg.them { background: rgba(255,255,255,0.05); color: var(--text); border-bottom-left-radius: 2px; }
.rv-am-chat-msg.me { background: var(--brand); color: #fff; margin-left: auto; border-bottom-right-radius: 2px; }
.rv-am-chat-time { font-size: 9.5px; color: var(--text-muted); margin: 0 4px 4px; }

/* Warning banner */
.rv-am-warn {
  padding: 10px 12px; border-radius: 8px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.28);
  font-size: 12px; color: #fda4a4; line-height: 1.5;
  margin-bottom: 10px;
}
.rv-am-warn b { color: #fff; }

/* Agent picker grid */
.rv-am-agent-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 280px; overflow-y: auto; }
.rv-am-agent-pick {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(14,12,28,0.5); border: 1.5px solid var(--border);
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; gap: 10px;
}
.rv-am-agent-pick:hover { border-color: var(--brand); }
.rv-am-agent-pick.active { border-color: var(--accent-violet); background: rgba(168,85,247,0.08); }
.rv-am-ap-avatar { width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-pixel); font-size: 11px; font-weight: 700; }
.rv-am-ap-name { font-size: 12.5px; font-weight: 600; color: #fff; }
.rv-am-ap-meta { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }

/* Slider for price adjust */
.rv-am-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,0.08);
  outline: none; margin: 6px 0;
}
.rv-am-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-gold);
  cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(245,158,11,0.5);
}

/* Market preview card */
.rv-am-preview-card {
  padding: 14px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(168,85,247,0.04));
  border: 1px solid var(--border);
}

/* ===== RV Action Modal — New System (rentals-card.js) ===== */

.rv-action-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.65);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.rv-action-modal.active { display: flex; }

.rv-am-box {
  position: relative;
  background: var(--card, #1a1730);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px;
  max-width: 520px; width: 94%;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.rv-am-box.wide { max-width: 680px; }

.rv-am-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-muted);
  font-size: 22px; cursor: pointer; line-height: 1;
  opacity: 0.6; transition: opacity 0.15s;
}
.rv-am-close:hover { opacity: 1; }

.rv-am-header {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 18px;
}
.rv-am-title { font-size: 16px; font-weight: 700; color: #fff; }
.rv-am-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.rv-am-section {
  padding: 12px 14px; margin-bottom: 10px;
  background: rgba(14,12,28,0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.rv-am-kv-title {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.rv-am-kv {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; font-size: 12.5px;
}
.rv-am-kv + .rv-am-kv { border-top: 1px dashed rgba(255,255,255,0.05); }
.rv-am-kv span { color: var(--text-muted); }
.rv-am-kv b { color: var(--text); font-weight: 600; }
.rv-am-highlight { color: var(--accent-gold, #f59e0b) !important; }

.rv-am-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: rgba(168,85,247,0.15); color: var(--accent-violet, #a855f7); font-size: 10px; font-weight: 600; }

.rv-am-warning {
  padding: 10px 12px; border-radius: 8px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.28);
  font-size: 12px; color: #fda4a4; line-height: 1.5;
  margin-bottom: 10px;
}

.rv-am-checkbox {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 0; font-size: 12.5px; color: var(--text);
  cursor: pointer;
}
.rv-am-checkbox input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--brand, #6366f1);
}

.rv-am-tip {
  font-size: 11px; color: var(--text-dim, #666);
  line-height: 1.5; margin-top: 8px; padding: 0 2px;
}

.rv-am-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--border);
}

.rv-am-btn {
  padding: 9px 20px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.rv-am-btn:hover { background: rgba(255,255,255,0.1); }
.rv-am-btn.primary { background: var(--brand, #6366f1); color: #fff; border-color: var(--brand, #6366f1); }
.rv-am-btn.primary:hover { filter: brightness(1.15); }
.rv-am-btn.danger { background: rgba(239,68,68,0.15); color: #f87171; border-color: rgba(239,68,68,0.3); }
.rv-am-btn.danger:hover { background: rgba(239,68,68,0.25); }
.rv-am-btn.secondary { background: rgba(99,102,241,0.1); color: var(--brand, #6366f1); border-color: rgba(99,102,241,0.25); }

/* Price input row */
.rv-am-price-input-row {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 0;
}
.rv-am-cur-sym { font-size: 18px; font-weight: 700; color: var(--accent-gold, #f59e0b); }
.rv-am-input {
  background: rgba(14,12,28,0.7); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 12px; color: var(--text);
  font-size: 14px; outline: none; width: 100px;
}
.rv-am-input:focus { border-color: var(--brand, #6366f1); }
.rv-am-input.full { width: 100%; }
.rv-am-price-unit { font-size: 12px; color: var(--text-muted); }
.rv-am-price-current { color: var(--accent-gold, #f59e0b); font-size: 15px; }
.rv-am-price-delta { font-size: 12px; margin-top: 4px; font-weight: 600; }
.rv-am-price-delta.up { color: #22c55e; }
.rv-am-price-delta.down { color: #ef4444; }

/* Radio group */
.rv-am-radio-group { display: flex; gap: 8px; }
.rv-am-radio {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 8px;
  background: rgba(14,12,28,0.5); border: 1px solid var(--border);
  cursor: pointer; font-size: 12.5px; color: var(--text);
  transition: all 0.15s;
}
.rv-am-radio.active { border-color: var(--brand, #6366f1); background: rgba(99,102,241,0.08); }
.rv-am-radio input { accent-color: var(--brand, #6366f1); }

/* Time inputs & day pills */
.rv-am-custom-time { margin-top: 10px; }
.rv-am-time-inputs {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.rv-am-time-inputs span { color: var(--text-muted); }
.rv-am-day-pills { display: flex; gap: 6px; margin-bottom: 8px; }
.rv-am-day {
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,12,28,0.5); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; cursor: pointer;
  transition: all 0.15s;
}
.rv-am-day.active { background: var(--brand, #6366f1); border-color: var(--brand); color: #fff; }
.rv-am-day-presets { display: flex; gap: 6px; margin-bottom: 10px; }
.rv-am-preset {
  padding: 4px 12px; border-radius: 4px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 11px; cursor: pointer;
}
.rv-am-preset:hover { color: var(--text); border-color: var(--brand); }

/* Slot chips */
.rv-am-slots-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 28px; }
.rv-am-slot-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25);
  color: var(--text); font-size: 11.5px;
}
.rv-am-slot-x { cursor: pointer; opacity: 0.5; font-size: 13px; }
.rv-am-slot-x:hover { opacity: 1; color: #f87171; }
.rv-am-slots-empty { color: var(--text-dim); font-size: 11px; padding: 4px; }
.rv-am-add-slot { margin-top: 8px; }

/* Field labels */
.rv-am-field-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }

/* Tag chips */
.rv-am-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rv-am-tag-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 12px;
  background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.25);
  color: var(--text); font-size: 11.5px;
}
.rv-am-tag-x { cursor: pointer; opacity: 0.5; font-size: 12px; }
.rv-am-tag-x:hover { opacity: 1; color: #f87171; }
.rv-am-tag-add {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); border: 1px dashed var(--border);
  color: var(--text-muted); font-size: 16px; cursor: pointer;
}
.rv-am-tag-add:hover { border-color: var(--brand); color: var(--brand); }

/* Agent summary (in list modal) */
.rv-am-agent-summary {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 0;
}
.rv-am-agent-avatar {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.rv-am-agent-name { font-size: 14px; font-weight: 700; color: #fff; }
.rv-am-agent-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Skill chips */
.rv-am-skill-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rv-am-skill-chip {
  padding: 2px 8px; border-radius: 4px;
  background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
  color: var(--text-muted); font-size: 10.5px;
}

/* Currency tabs */
.rv-am-currency-tabs { display: flex; gap: 0; margin-bottom: 8px; }
.rv-am-cur-tab {
  flex: 1; padding: 8px; text-align: center;
  background: rgba(14,12,28,0.5); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.rv-am-cur-tab:first-child { border-radius: 6px 0 0 6px; }
.rv-am-cur-tab:last-child { border-radius: 0 6px 6px 0; }
.rv-am-cur-tab.active { background: var(--brand, #6366f1); border-color: var(--brand); color: #fff; }
.rv-am-convert-hint { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* Terms (in list modal) */
.rv-am-terms.rv-am-section { padding-left: 14px; }
.rv-am-term { font-size: 12px; color: var(--text-dim); line-height: 2; }

/* Preview */
.rv-am-preview-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rv-am-preview-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* Step bar (list-new wizard) */
.rv-am-step-bar { display: flex; gap: 0; margin-bottom: 14px; }
.rv-am-step {
  flex: 1; text-align: center; padding: 8px 4px;
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  border-bottom: 2px solid var(--border);
  transition: all 0.15s;
}
.rv-am-step.active { color: var(--brand, #6366f1); border-color: var(--brand); }

/* Agent picker additions */
.rv-am-agent-pick.selected { border-color: var(--accent-violet); background: rgba(168,85,247,0.08); }
.rv-am-pick-name { font-size: 12.5px; font-weight: 600; color: #fff; }
.rv-am-pick-desc { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }
.rv-am-empty { text-align: center; padding: 30px 10px; color: var(--text-dim); font-size: 12.5px; grid-column: 1 / -1; }
.rv-am-empty a { color: var(--brand, #6366f1); cursor: pointer; text-decoration: underline; }

/* Onboarding guide */
.rv-am-onboard { display: flex; flex-direction: column; gap: 16px; padding: 8px 0; }
.rv-am-onboard-step { display: flex; gap: 14px; align-items: flex-start; }
.rv-am-onboard-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand, #6366f1); color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.rv-am-onboard-content { flex: 1; }
.rv-am-onboard-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.rv-am-onboard-desc { font-size: 12px; color: var(--text-dim); line-height: 1.7; }
.rv-am-onboard-code {
  display: inline-block; background: var(--surface, #1a1730); padding: 4px 8px; border-radius: 4px;
  font-size: 11px; color: var(--text); word-break: break-all; margin: 4px 0;
  border: 1px solid var(--border);
}
.rv-am-onboard-copy {
  font-size: 10px; padding: 2px 8px; margin-left: 4px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 4px; vertical-align: middle;
}
.rv-am-onboard-copy:hover { color: var(--text); border-color: var(--text-dim); }

/* Renter badge in card */
.rv-renter-badge {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  background: rgba(239,68,68,0.15); color: #f87171;
  font-size: 10px; font-weight: 600; margin-left: 6px;
}

/* (duplicate rv-card-body removed — correct definition is at line ~6397) */

.rv-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  color: var(--text-muted); font-size: 13px;
}
.rv-empty-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.4; }

@media (max-width: 1100px) {
  .rv-aside { width: 260px; padding: 18px 14px 22px; }
}
@media (max-width: 900px) {
  #rentals-view { flex-direction: column; overflow-y: auto; }
  .rv-aside { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .rv-main { overflow-y: visible; }
  .rv-grid { grid-template-columns: 1fr; padding: 8px 16px 32px; }
  .rv-header, .rv-toolbar, .rv-tabs-row, .rv-page-header { padding-left: 16px; padding-right: 16px; }
  .rv-filter-pills { padding-left: 16px; padding-right: 16px; }
}

/* === LEGACY APP CSS (preserved for backward compatibility) === */

/* Inputs & Buttons */
.input { background: var(--surface); border: 2px solid var(--surface2); border-radius: 6px; padding: 10px 14px; color: var(--text); font-family: var(--font-ui); font-size: 14px; outline: none; }
.input:focus { border-color: var(--primary); }
textarea.input { resize: vertical; min-height: 60px; }
.btn { background: var(--surface2); border: none; border-radius: 6px; padding: 10px 18px; color: var(--text); font-family: var(--font-ui); font-size: 13px; cursor: pointer; transition: background .2s; }
.btn:hover { background: var(--accent); color: var(--bg); }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--accent); }
.btn-success { background: var(--success); color: var(--bg); }
.btn-error { background: var(--error); }
.btn-accent { background: var(--accent); color: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: 11px; }

/* Layout */
.main-layout { display: flex; height: calc(100vh - 56px); }
.sidebar { width: 240px; background: var(--surface); border-right: 2px solid var(--surface2); overflow-y: auto; padding: 12px; }
.center { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Workspace Layout */
.workspace-layout { display: flex; height: calc(100vh - 56px); margin-top: 56px; }
.workspace-sidebar { width: 260px; background: var(--surface); border-right: 2px solid var(--surface2); overflow-y: auto; padding: 16px 12px; display: flex; flex-direction: column; gap: 16px; }
.workspace-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.sidebar-nav-group { display: flex; flex-direction: column; gap: 8px; }
.sidebar-nav-item { width: 100%; text-align: left; background: transparent; border: 1px solid var(--surface2); color: var(--text); padding: 10px 12px; border-radius: 10px; cursor: pointer; font-family: var(--font-ui); font-size: 13px; transition: background .15s, border-color .15s; }
.sidebar-nav-item:hover { background: var(--surface2); }
.sidebar-nav-item.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.sidebar-divider { height: 1px; background: var(--surface2); }

/* Sidebar */
.sidebar-section { margin-bottom: 20px; }
.sidebar-title { font-family: var(--font-pixel); font-size: 9px; color: var(--accent); margin-bottom: 8px; letter-spacing: 1px; }
.bot-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.bot-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; transition: background .15s; }
.bot-item:hover, .bot-item.active { background: var(--surface2); }
.bot-avatar-sm { border-radius: 3px; image-rendering: pixelated; }
.bot-avatar-md { border-radius: 4px; image-rendering: pixelated; }
.bot-name { font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-status { font-size: 10px; color: var(--text-dim); }
.bot-status.online { color: var(--success); }
.btn-info-sm { width: 22px; height: 22px; border: none; border-radius: 50%; background: var(--surface2); color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.btn-info-sm:hover { background: var(--accent); color: var(--bg); }


/* Office */
.office-wrapper { padding: 8px; border-bottom: 2px solid var(--surface2); min-height: 60px; display: flex; flex-direction: column; gap: 8px; }
.office { min-height: 50px; }
.office-empty { text-align: center; padding: 20px; color: var(--text-dim); font-size: 13px; }
.team-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; }
.team-tab { border: 1px solid var(--surface2); background: var(--surface); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 11px; cursor: pointer; white-space: nowrap; }
.team-tab.active { background: var(--primary); border-color: var(--primary); }
.team-tabs-empty { font-size: 11px; color: var(--text-dim); padding: 4px 2px; }
.office-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px; }
.office-desk { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px 8px; border-radius: 8px; background: var(--surface); position: relative; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; }
.office-desk:hover { background: var(--surface2); transform: translateY(-1px); }
.office-desk-active { box-shadow: inset 0 0 0 2px var(--accent); }
.desk-info-btn { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border: none; border-radius: 50%; background: var(--surface2); color: var(--accent); font-size: 11px; font-weight: 700; cursor: pointer; }
.desk-info-btn:hover { background: var(--accent); color: var(--bg); }
.desk-surface { width: 48px; height: 28px; background: var(--surface2); border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.desk-screen { width: 36px; height: 18px; background: #1a1a2e; border-radius: 2px; border: 1px solid #444; }
.desk-chair { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: -4px; }
.desk-chair-label { font-size: 12px; font-weight: 700; color: #fff; }
.desk-name { font-size: 10px; font-weight: 600; color: var(--text); max-width: 72px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desk-type { font-size: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.office-overflow { text-align: center; font-size: 11px; color: var(--text-dim); padding: 4px; }

/* Thinking animation */
.desk-thinking { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; }
.thinking-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--warning); animation: thinking 1.2s infinite; }
.thinking-dot:nth-child(2) { animation-delay: 0.2s; }
.thinking-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinking { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.2); } }

/* Chat */
.chat-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--surface2); font-size: 13px; font-weight: 500; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; flex-direction: column; gap: 4px; }
.msg-user { align-items: flex-end; }
.msg-bot { align-items: flex-start; }
.msg-bot-name { font-size: 11px; color: var(--accent); padding: 0 4px; }
.msg-bubble { max-width: 70%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.msg-user .msg-bubble { background: var(--primary); border-bottom-right-radius: 4px; }
.msg-bot .msg-bubble { background: var(--surface2); border-bottom-left-radius: 4px; }
.chat-input-area { display: flex; gap: 8px; padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--surface2); }
.chat-input { flex: 1; }
.chat-mention-list { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); display: none; background: var(--surface); border: 1px solid var(--surface2); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.28); padding: 6px; z-index: 20; max-height: 240px; overflow-y: auto; }
.chat-mention-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; cursor: pointer; }
.chat-mention-item:hover, .chat-mention-item.selected { background: var(--surface2); }
.member-chip { border: 1px solid transparent; transition: transform .15s, border-color .15s, background .15s; }
.member-chip:hover { transform: translateY(-1px); border-color: var(--accent); }
.active-member { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.chat-input-shell { position: relative; flex: 1; }
.chat-input-overlay, .chat-input-real { width: 100%; min-height: 42px; padding: 10px 14px; font-family: var(--font-ui); font-size: 14px; line-height: 1.5; letter-spacing: 0; white-space: pre-wrap; word-break: break-word; }
.chat-input-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; color: var(--text); background: var(--surface); border: 2px solid var(--surface2); border-radius: 6px; overflow: hidden; }
.chat-input-real { position: relative; z-index: 2; background: transparent !important; border-color: transparent !important; color: transparent !important; -webkit-text-fill-color: transparent; caret-color: var(--text); box-shadow: none !important; }
.chat-input-real:focus + .chat-input-overlay { border-color: var(--primary); }
.chat-mention-token { color: var(--accent); font-weight: 600; }
.chat-mention-token-invalid { color: var(--text-dim); text-decoration: underline; text-decoration-style: dotted; }
.md-code-block { background: rgba(0,0,0,.3); border-radius: 6px; padding: 8px 10px; margin: 4px 0; overflow-x: auto; font-size: 11px; font-family: 'SF Mono', 'Fira Code', monospace; white-space: pre-wrap; }
.md-inline-code { background: rgba(0,0,0,.2); border-radius: 3px; padding: 1px 4px; font-size: 11px; font-family: 'SF Mono', 'Fira Code', monospace; }
.chat-input-placeholder { color: var(--text-dim); }

/* Panel (slide-in from right) */
.panel-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); display: flex; justify-content: flex-end; }
.panel-content { width: 360px; max-width: 90vw; background: var(--surface); padding: 24px; overflow-y: auto; animation: slideIn .2s ease; display: flex; flex-direction: column; gap: 12px; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; }
.modal-content { background: var(--surface); border-radius: 12px; padding: 24px; width: 400px; max-width: 90vw; display: flex; flex-direction: column; gap: 12px; animation: fadeIn .2s; }
.modal-lg { width: 600px; max-height: 80vh; overflow-y: auto; }
.marketplace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.marketplace-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--surface2); border-radius: 10px; }
.marketplace-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.marketplace-tag { font-size: 10px; padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text); }
.marketplace-tag-primary { background: rgba(108, 92, 231, .28); color: var(--accent); }

/* Marketplace page */
.mp-shell { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.mp-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--surface2); flex-shrink: 0; flex-wrap: wrap; }
.mp-header h2 { margin: 0; font-size: 20px; }
.mp-header p { margin: 4px 0 0; font-size: 12px; color: var(--text-dim); }
.market-view { padding: 24px; }
.market-view .rv-page-header { margin-bottom: 16px; }
.mp-search-bar { display: flex; gap: 8px; }
.mp-search-bar .input { width: 220px; }
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 20px 24px; overflow-y: auto; align-content: start; }
.mp-loading,.mp-empty { grid-column: 1/-1; color: var(--text-dim); font-size: 13px; padding: 40px 0; text-align: center; }
.mp-card { background: var(--surface); border: 1px solid var(--surface2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s; }
.mp-card:hover { border-color: var(--primary); }
.mp-card-top { display: flex; align-items: center; gap: 12px; }
.mp-avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.mp-card-info { flex: 1; min-width: 0; }
.mp-card-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-card-status { font-size: 11px; margin-top: 2px; }
.mp-card-status.online { color: var(--success); }
.mp-card-status.offline { color: var(--text-dim); }
.mp-card-status.working { color: #f59e0b; }
.mp-card-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin: 0; }
.mp-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.mp-tag { font-size: 10px; padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--text-dim); }
.mp-tag-model { background: rgba(108,92,231,.2); color: var(--accent); }
.mp-card-price { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; padding-top: 4px; border-top: 1px solid var(--surface2); }
.mp-price-unit { font-size: 11px; font-weight: 400; color: var(--text-dim); }
.mp-price-min { font-size: 11px; font-weight: 400; color: var(--text-dim); }
@keyframes fadeIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

.bot-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.browse-card { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--surface2); border-radius: 8px; }
.browse-info { flex: 1; }
.browse-info strong { font-size: 13px; }
.browse-info p { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.price { font-size: 11px; color: var(--warning); }

/* Pages */
.page-shell { padding: 20px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; }
.page-header h2 { margin: 0; font-size: 24px; }
.page-header p { margin: 6px 0 0; color: var(--text-dim); }
.bot-page-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.section-title { margin: 0 0 12px; font-size: 16px; }
.resource-grid { display: grid; gap: 12px; }
.resource-card { background: var(--surface); border: 1px solid var(--surface2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.resource-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.resource-meta { font-size: 12px; color: var(--text-dim); }
.empty-card { background: var(--surface); border: 1px dashed var(--surface2); border-radius: 14px; padding: 24px; color: var(--text-dim); text-align: center; }
.status-pill { font-size: 11px; padding: 4px 8px; border-radius: 999px; }

/* Bot Management redesign */
.bm-shell { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.bm-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--surface2); flex-shrink: 0; }
.bm-header h2 { margin: 0; font-size: 20px; }
.bm-header p { margin: 4px 0 0; font-size: 12px; color: var(--text-dim); }
.bm-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 0; flex: 1; overflow: hidden; }
.bm-section { display: flex; flex-direction: column; overflow: hidden; padding: 20px 24px; border-right: 1px solid var(--surface2); }
.bm-section:last-child { border-right: none; }
.bm-section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; flex-shrink: 0; }
.bm-count { background: var(--surface2); color: var(--text-dim); font-size: 11px; padding: 2px 7px; border-radius: 999px; font-weight: 400; letter-spacing: 0; }
.bm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; overflow-y: auto; flex: 1; align-content: start; }
.bm-empty { color: var(--text-dim); font-size: 13px; padding: 32px 0; text-align: center; border: 1px dashed var(--surface2); border-radius: 12px; }

.bm-card { background: var(--surface); border: 1px solid var(--surface2); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s; }
.bm-card:hover { border-color: var(--primary); }
.bm-card-top { display: flex; align-items: center; gap: 12px; }
.bm-avatar { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.bm-avatar-hired { background: var(--surface2); color: var(--accent); }
.bm-card-info { flex: 1; min-width: 0; }
.bm-card-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-card-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.bm-pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; flex-shrink: 0; }
.bm-pill.online { background: rgba(0,184,148,.15); color: var(--success); }
.bm-pill.offline { background: rgba(255,255,255,.07); color: var(--text-dim); }
.bm-pill.hired { background: rgba(108,92,231,.2); color: var(--accent); }
.bm-card-desc { font-size: 12px; color: var(--text-dim); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bm-card-footer { display: flex; align-items: center; justify-content: space-between; }
.bm-tag { font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--surface2); color: var(--text-dim); }
.bm-tag.listed { background: rgba(108,92,231,.18); color: var(--accent); }
.bm-card-stats { display: flex; gap: 16px; }
.bm-stat { display: flex; flex-direction: column; gap: 2px; }
.bm-stat-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.bm-stat-val { font-size: 13px; font-weight: 600; color: var(--text); }

/* Stats */
.stats { display: flex; gap: 16px; font-size: 12px; }
.stats span { color: var(--accent); }

/* Toast */
#toast-container { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 18px 12px; border-radius: 0;
  font-family: var(--font-pixel); font-size: 9px; letter-spacing: 0.5px;
  color: #fff; background: #0a0814;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #0a0814, 0 6px 0 rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.05);
  min-width: 260px; max-width: 480px;
  image-rendering: pixelated;
  opacity: 0; transform: translateY(-10px);
  transition: opacity .18s steps(3, end), transform .18s steps(3, end);
  text-shadow: 1px 1px 0 #000; line-height: 1.65;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast::before { content: '▶'; flex-shrink: 0; font-size: 11px; line-height: 1.5; text-shadow: 1px 1px 0 #000; }
.toast-success::before { color: #4ade80; }
.toast-error::before { color: #f87171; }
.toast-warning::before { color: #fbbf24; }
.toast-info::before { color: #a5b4fc; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { width: 180px; }
  .panel-content { width: 100%; }
  .modal-content { width: 95vw; }
}

/* Avatar */
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin: 0 auto; }

/* Panel fix */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: 0; z-index: 100; overflow: hidden; }

/* Team Management Page */
.team-page-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  height: 100%;
  padding: 20px;
}

.team-rail {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.team-rail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.team-rail-header h2 {
  font-size: 18px;
  margin: 0;
}

.team-rail-header p {
  font-size: 11px;
  color: var(--text-dim);
  margin: 4px 0 0;
}

.team-rail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.team-rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--surface2);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  transition: background .15s, border-color .15s;
}

.team-rail-item:hover {
  background: var(--surface2);
}

.team-rail-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.team-rail-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-rail-empty {
  font-size: 12px;
  color: var(--text-dim);
  padding: 8px;
  text-align: center;
}

.team-stage {
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

/* Welcome state */
.team-welcome {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 32px;
}

.team-welcome-inner {
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.team-welcome-inner h2 {
  font-size: 22px;
  margin: 0;
}

.team-welcome-inner p {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
}

.team-welcome-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}

/* Workspace state */
.team-workspace-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.team-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface2);
}

.team-workspace-header h2 {
  font-size: 18px;
  margin: 0;
}

.team-workspace-header p {
  font-size: 12px;
  color: var(--text-dim);
  margin: 4px 0 0;
}

.team-workspace-positions {
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface2);
  overflow-y: auto;
}

.team-workspace-chat {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.position-grid { display: grid; gap: 12px; }
.position-card { background: var(--surface2); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.position-skill-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--surface); border-radius: 10px; }

/* Rail positions */
.rail-positions { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 6px 12px; }
.rail-positions-list { display: flex; flex-direction: column; gap: 2px; }
.rail-position-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 12px; color: var(--text-dim); transition: background .15s, color .15s; }
.rail-position-item:hover { background: var(--surface2); color: var(--text); }
.rail-position-item.rail-position-manager { color: var(--accent); font-weight: 600; }
.rail-position-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--surface2); }
.rail-position-dot.online { background: var(--success); }
.rail-position-dot.offline { background: var(--text-dim); }
.rail-position-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-new-position-btn { align-self: flex-start; margin-top: 4px; font-size: 11px; color: var(--text-dim); background: transparent; border: 1px dashed var(--surface2); }
.rail-new-position-btn:hover { background: var(--surface2); color: var(--text); }
.msg-system { display: flex; justify-content: center; }
.msg-system-text { font-size: 12px; color: var(--text-dim); background: rgba(255,255,255,0.06); border-radius: 999px; padding: 6px 12px; }

/* Markdown bubble */
.msg-bubble-md { line-height: 1.6; }
.msg-bubble-md p { margin: 0 0 8px; }
.msg-bubble-md p:last-child { margin-bottom: 0; }
.msg-bubble-md h1,.msg-bubble-md h2,.msg-bubble-md h3,.msg-bubble-md h4 { margin: 12px 0 6px; font-size: 14px; color: var(--accent); }
.msg-bubble-md h1 { font-size: 16px; }
.msg-bubble-md ul,.msg-bubble-md ol { padding-left: 18px; margin: 6px 0; }
.msg-bubble-md li { margin: 3px 0; }
.msg-bubble-md code { background: rgba(0,0,0,0.3); border-radius: 4px; padding: 1px 5px; font-family: monospace; font-size: 12px; color: var(--accent); }
.msg-bubble-md pre { background: rgba(0,0,0,0.35); border-radius: 8px; padding: 12px; overflow-x: auto; margin: 8px 0; }
.msg-bubble-md pre code { background: none; padding: 0; color: var(--text); font-size: 12px; }
.msg-bubble-md blockquote { border-left: 3px solid var(--primary); padding-left: 10px; color: var(--text-dim); margin: 6px 0; }
.msg-bubble-md strong { color: var(--text); }
.msg-bubble-md a { color: var(--accent); text-decoration: underline; }
.msg-bubble-md hr { border: none; border-top: 1px solid var(--surface2); margin: 10px 0; }
.msg-bubble-md table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 12px; }
.msg-bubble-md th,.msg-bubble-md td { border: 1px solid var(--surface2); padding: 6px 10px; text-align: left; }
.msg-bubble-md th { background: var(--surface2); color: var(--accent); }

/* ===== Profile Dropdown ===== */
.profile-dropdown { position: fixed; z-index: 300; background: var(--surface); border: 1px solid var(--surface2); border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.4); width: 280px; animation: fadeIn .15s; }
.profile-dropdown-header { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--surface2); }
.profile-dropdown-info { flex: 1; min-width: 0; }
.profile-dropdown-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-dropdown-email { font-size: 11px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-dropdown-wallet { padding: 12px 16px; border-bottom: 1px solid var(--surface2); }
.profile-dropdown-wallet-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }
.profile-dropdown-wallet-amount { font-size: 20px; font-weight: 700; margin: 4px 0 8px; }
.profile-dropdown-wallet-actions { display: flex; gap: 8px; }
.profile-dropdown-menu { padding: 8px; }
.profile-dropdown-item { display: block; width: 100%; text-align: left; background: transparent; border: none; color: var(--text); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-family: var(--font-ui); font-size: 13px; transition: background .15s; }
.profile-dropdown-item:hover { background: var(--surface2); }
.profile-dropdown-logout { color: var(--error); }
.profile-dropdown-divider { height: 1px; background: var(--surface2); margin: 4px 0; }

/* ========= CHANNELS VIEW (Accio-style) ========= */
.cv-container { padding: 28px 36px; overflow-y: auto; flex: 1; }
.cv-header { margin-bottom: 16px; }
.cv-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.cv-subtitle { display: none; }
.cv-count { display: none; }
.cv-loading { text-align: center; padding: 48px; color: var(--text-dim); font-size: 13px; }
.cv-error { text-align: center; padding: 48px; color: var(--error); font-size: 13px; }

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

/* --- Channel Card (Accio-style) --- */
.cv-card {
  background: var(--bg-card, rgba(38,35,58,0.95));
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 14px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 0;
  transition: border-color .2s, box-shadow .2s;
}
.cv-card:hover { border-color: rgba(255,255,255,0.25); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.cv-card-empty { border-style: dashed; opacity: 0.75; }
.cv-card-empty:hover { opacity: 1; }

/* Card head: icon + name + desc + badge */
.cv-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.cv-card-identity { display: flex; align-items: center; gap: 10px; }
.cv-card-icon { width: 36px; height: 36px; flex-shrink: 0; }
.cv-card-icon svg { width: 36px; height: 36px; border-radius: 50%; }
.cv-icon-fallback { width: 36px; height: 36px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.cv-card-info { display: flex; flex-direction: column; gap: 2px; }
.cv-card-name { font-size: 15px; font-weight: 700; white-space: nowrap; }
.cv-card-desc { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.cv-help-link { font-size: 12px; color: #3370ff; text-decoration: none; }
.cv-help-link:hover { text-decoration: underline; }

/* Status badge (pill) */
.cv-badge {
  display: inline-block; font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}
.cv-badge.disconnected { background: rgba(255,255,255,0.08); color: var(--text-dim); }
.cv-badge.connected { background: rgba(0,184,148,0.15); color: #00b894; }
.cv-badge.error { background: rgba(214,48,49,0.15); color: #d63031; }

/* Stats row */
.cv-card-stats {
  display: flex; gap: 0; margin-bottom: 12px;
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  border-radius: 8px; overflow: hidden;
}
.cv-stat {
  flex: 1; padding: 8px 10px; text-align: center;
  border-right: 1px solid var(--border, rgba(255,255,255,0.1));
}
.cv-stat:last-child { border-right: none; }
.cv-stat-label { font-size: 10px; color: var(--text-dim); margin-bottom: 3px; }
.cv-stat-value { font-size: 14px; font-weight: 700; }
.cv-stat-connected { color: #00b894; }
.cv-stat-error { color: #d63031; }
.cv-stat-disconnected { color: var(--text-dim); }

/* Error message */
.cv-card-error { font-size: 11px; color: #d63031; margin-bottom: 12px; padding: 6px 10px; background: rgba(214,48,49,0.08); border-radius: 6px; }

/* Dream binding area (Accio: "请配置智能体") */
.cv-card-dream-bind {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 12px;
  border: 1px dashed var(--border, rgba(255,255,255,0.12));
  border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.cv-card-dream-bind:hover { background: rgba(255,255,255,0.03); }
.cv-card-dream-bind.bound { border-style: solid; border-color: rgba(108,92,231,0.3); background: rgba(108,92,231,0.06); }
.cv-dream-icon { font-size: 18px; flex-shrink: 0; width: 28px; text-align: center; color: var(--text-dim); }
.cv-card-dream-bind.bound .cv-dream-icon { color: var(--primary, #6c5ce7); }
.cv-dream-title { font-size: 13px; font-weight: 600; }
.cv-dream-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.cv-dream-arrow { font-size: 20px; color: var(--text-dim); margin-left: auto; }

/* Dream picker dropdown */
.cv-dream-picker {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 50;
  background: var(--bg-panel, #252238); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  margin-top: 6px; max-height: 260px; overflow-y: auto;
}
.cv-dp-list { padding: 4px; }
.cv-dp-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background .15s;
}
.cv-dp-item:hover { background: rgba(255,255,255,0.06); }
.cv-dp-item.active { background: rgba(108,92,231,0.12); }
.cv-dp-name { font-size: 13px; font-weight: 600; }
.cv-dp-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.cv-dp-check { font-size: 11px; color: var(--primary, #6c5ce7); font-weight: 500; flex-shrink: 0; margin-left: 8px; }
.cv-dp-unbind {
  padding: 10px 12px; text-align: center; font-size: 12px; color: var(--text-dim);
  cursor: pointer; border-top: 1px solid var(--border, rgba(255,255,255,0.08));
  transition: color .15s;
}
.cv-dp-unbind:hover { color: #d63031; }

/* Bottom action button (Accio: "设置机器人") */
.cv-card-bottom { display: flex; gap: 8px; }
.cv-action-btn {
  flex: 1; padding: 8px 0; border-radius: 8px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: transparent; color: var(--text); cursor: pointer;
  transition: background .15s, border-color .15s;
  font-family: var(--font-ui);
}
.cv-action-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }
.cv-action-btn.secondary { color: var(--text-dim); }
.cv-action-btn.danger { color: #d63031; border-color: rgba(214,48,49,0.3); }
.cv-action-btn.danger:hover { background: rgba(214,48,49,0.1); }
.cv-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Add Panel (modal) --- */
.cv-add-panel {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
}
.cv-add-card {
  background: var(--bg-card, #1e1b2e);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 520px; max-width: 92vw; max-height: 88vh;
  overflow-y: auto;
}
.cv-add-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 24px 0;
}
.cv-add-header-left { display: flex; align-items: center; gap: 12px; }
.cv-add-header-icon { width: 32px; height: 32px; flex-shrink: 0; }
.cv-add-header-icon svg { width: 32px; height: 32px; border-radius: 8px; }
.cv-add-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.cv-add-close { background: none; border: none; color: var(--text-dim); font-size: 24px; cursor: pointer; padding: 0 4px; line-height: 1; }
.cv-add-close:hover { color: var(--text); }
.cv-add-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.cv-add-field { display: flex; flex-direction: column; gap: 6px; }
.cv-add-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.cv-field-hint { font-weight: 400; color: var(--text-dim); font-size: 12px; margin-left: 4px; }
.cv-required { color: #e74c3c; }

.cv-guide-box {
  background: rgba(255,193,7,0.08);
  border: 1px dashed rgba(255,193,7,0.35);
  border-radius: 12px;
  padding: 16px 18px;
}
.cv-guide-title { font-size: 13px; font-weight: 700; color: #f0a500; margin-bottom: 8px; }
.cv-guide-steps {
  margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.8;
  color: var(--text-dim, #b0aec6);
}
.cv-guide-steps li { margin-bottom: 2px; }
.cv-guide-steps b { color: var(--text, #e8e6f0); font-weight: 600; }
.cv-guide-steps code { background: rgba(0,0,0,0.3); padding: 1px 6px; border-radius: 4px; font-size: 11px; color: #a8d8ea; }
.cv-guide-steps a { color: #3370ff; text-decoration: none; }
.cv-guide-steps a:hover { text-decoration: underline; }
.cv-guide-section { margin-bottom: 12px; }
.cv-guide-section:last-child { margin-bottom: 0; }
.cv-guide-step-title { font-size: 13px; font-weight: 700; color: var(--text, #e8e6f0); margin-bottom: 4px; }
.cv-guide-step-desc { font-size: 12.5px; color: var(--text-dim, #b0aec6); line-height: 1.7; }
.cv-guide-step-desc a { color: #3370ff; text-decoration: none; }
.cv-guide-step-desc a:hover { text-decoration: underline; }
.cv-guide-step-desc b { color: var(--text, #e8e6f0); font-weight: 600; }
.cv-guide-copyblock {
  margin-top: 8px; position: relative;
  background: rgba(0,0,0,0.25); border-radius: 8px; padding: 12px 14px;
}
.cv-guide-copyblock pre {
  margin: 0; font-size: 11px; line-height: 1.5; color: #a8d8ea;
  white-space: pre-wrap; word-break: break-all;
}
.cv-guide-copyblock code {
  font-size: 12px; color: #a8d8ea;
}
.cv-guide-copyblock-inline {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
}
.cv-copy-btn {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-dim, #b0aec6); font-size: 11px; padding: 3px 10px;
  border-radius: 6px; cursor: pointer; transition: all 0.15s;
}
.cv-guide-copyblock-inline .cv-copy-btn {
  position: static;
}
.cv-copy-btn:hover { background: rgba(255,255,255,0.18); color: var(--text, #e8e6f0); }
.cv-copy-btn-inline {
  position: static; display: inline-block; margin-top: 6px;
  padding: 5px 14px; font-size: 12px;
}

.cv-input {
  padding: 11px 14px; border-radius: 10px;
  background: var(--surface2, rgba(255,255,255,0.06));
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  color: var(--text); font-size: 13px; font-family: var(--font-ui);
  transition: border-color .2s;
}
.cv-input:focus { border-color: var(--primary, #6c5ce7); outline: none; }
.cv-input::placeholder { color: var(--text-dim, #8a87a0); opacity: 0.7; }

.cv-select {
  padding: 11px 14px; border-radius: 10px;
  background: var(--surface2, rgba(255,255,255,0.06));
  border: 1px solid var(--border); color: var(--text);
  font-size: 13px; font-family: var(--font-ui);
}
.cv-select:focus { border-color: var(--primary, #6c5ce7); outline: none; }

.cv-add-actions { display: flex; gap: 12px; margin-top: 8px; }
.cv-modal-btn {
  flex: 1; padding: 12px 0; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  font-family: var(--font-ui); transition: all .2s;
}
.cv-modal-btn-cancel { background: transparent; color: var(--text); }
.cv-modal-btn-cancel:hover { background: rgba(255,255,255,0.06); }
.cv-modal-btn-primary { background: #3370ff; color: #fff; border-color: #3370ff; }
.cv-modal-btn-primary:hover { background: #2860e0; border-color: #2860e0; }
.cv-modal-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- WeChat QR Scan --- */
.cv-wx-qr-area {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 24px;
  background: linear-gradient(135deg, rgba(7,193,96,0.06) 0%, rgba(7,193,96,0.02) 100%);
  border: 1px solid rgba(7,193,96,0.15);
  border-radius: 14px;
}
.cv-wx-qr-prompt {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.cv-wx-qr-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(7,193,96,0.12);
  display: flex; align-items: center; justify-content: center;
}
.cv-wx-qr-icon svg { width: 32px; height: 32px; }
.cv-wx-qr-hint {
  font-size: 13px; color: var(--text-dim); text-align: center; line-height: 1.6;
}
.cv-wx-gen-btn {
  padding: 12px 36px; border-radius: 10px; border: none;
  background: #07c160; color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .2s, transform .1s;
  font-family: var(--font-ui);
}
.cv-wx-gen-btn:hover { background: #06ad56; }
.cv-wx-gen-btn:active { transform: scale(0.97); }

.cv-wx-qr-display { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cv-wx-qr-frame {
  padding: 12px; background: #fff; border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}
.cv-wx-qr-frame img { display: block; width: 180px; height: 180px; border-radius: 4px; }
.cv-wx-scan-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim);
}
.cv-wx-scan-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #07c160;
  animation: cv-wx-pulse 1.5s ease-in-out infinite;
}
@keyframes cv-wx-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.cv-wx-scan-status.success { color: #07c160; font-weight: 600; }
.cv-wx-scan-status.success .cv-wx-scan-dot { animation: none; opacity: 1; }

.cv-wx-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cv-wx-spinner {
  width: 32px; height: 32px; border: 3px solid rgba(7,193,96,0.2);
  border-top-color: #07c160; border-radius: 50%;
  animation: cv-wx-spin 0.8s linear infinite;
}
@keyframes cv-wx-spin { to { transform: rotate(360deg); } }

@media (max-width: 1400px) {
  .cv-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .cv-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .cv-container { padding: 20px; }
  .cv-grid { grid-template-columns: 1fr; }
}

