/* ====== Reset & Base ====== */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1a1a2e; background: #f8f9fa; line-height: 1.6; font-size: 15px;
}
a { text-decoration:none; color: inherit; }
ul { list-style: none; }

/* ====== Variables ====== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --accent: #8b5cf6;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --text: #1a1a2e;
  --text-dim: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --bg: #f8f9fa;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

/* ====== Buttons ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-lg { padding: 12px 32px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ====== Navbar ====== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; }
.logo-icon { font-size: 24px; }
.logo-text { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dim); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

/* ====== Hero ====== */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  color: #fff; padding: 80px 24px 64px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(139,92,246,0.08) 0%, transparent 50%);
}
.hero-content { max-width: 800px; margin: 0 auto; position: relative; }
.hero-badge {
  display: inline-block; background: rgba(99,102,241,0.2); border: 1px solid rgba(99,102,241,0.4);
  color: #c4b5fd; padding: 6px 18px; border-radius: 20px; font-size: 14px; font-weight: 600; margin-bottom: 24px;
}
.hero h1 { font-size: 48px; font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; }
.gradient-text { background: linear-gradient(135deg, #c4b5fd, #818cf8, #6366f1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { color: #a5a5c0; font-size: 18px; margin-bottom: 32px; line-height: 1.8; }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 40px; justify-content: center; }
.hero-stat { text-align: center; }
.stat-val { font-size: 32px; font-weight: 800; color: #c4b5fd; }
.stat-lbl { font-size: 14px; color: #a5a5c0; }

/* ====== Sections ====== */
.section { padding: 64px 24px; max-width: 1200px; margin: 0 auto; }
.section-alt { background: #f1f5f9; max-width: none; padding-left: 24px; padding-right: 24px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.section-header p { color: var(--text-dim); font-size: 16px; }

/* ====== Features ====== */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center; transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.feature-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tag { padding: 2px 10px; background: var(--primary-light); color: var(--primary); border-radius: 4px; font-size: 12px; font-weight: 600; }

/* ====== Steps ====== */
.steps { display: flex; gap: 32px; max-width: 1000px; margin: 0 auto; }
.step { flex: 1; text-align: center; position: relative; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; margin: 0 auto 16px;
}
.step h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 14px; }

/* ====== Pricing ====== */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.pricing-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px;
  text-align: center; position: relative; transition: transform 0.2s, box-shadow 0.2s;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-featured { border: 2px solid var(--primary); }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.pricing-name { font-size: 18px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; }
.pricing-price { font-size: 40px; font-weight: 800; color: var(--text); }
.pricing-period { font-size: 16px; font-weight: 500; color: var(--text-dim); }
.pricing-trial { font-size: 14px; color: var(--success); font-weight: 600; margin: 8px 0 20px; }
.pricing-features { text-align: left; margin-bottom: 24px; }
.pricing-features li { padding: 6px 0; font-size: 14px; }

/* ====== FAQ ====== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 16px;
}
.faq-item h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.faq-item p { color: var(--text-dim); font-size: 14px; }

/* ====== Footer ====== */
.footer { background: #1e1b4b; color: #a5a5c0; padding: 48px 24px 32px; }
.footer-inner { max-width: 1200px; margin: 0 auto; text-align: center; }
.footer-brand { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 16px; }
.footer-links a { color: #a5a5c0; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: #c4b5fd; }
.footer-copy { font-size: 12px; color: #6b6b85; }

/* ====== App Layout ====== */
.app-nav {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
}
.app-nav-left { display: flex; align-items: center; gap: 12px; }
.nav-divider { color: var(--text-light); }
.nav-page { font-weight: 700; font-size: 16px; color: var(--text); }
.app-nav-right { display: flex; align-items: center; gap: 12px; }
.plan-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.plan-badge.free { background: #f3f4f6; color: var(--text-dim); }
.plan-badge.pro { background: var(--primary-light); color: var(--primary); }

.app-layout { display: flex; min-height: calc(100vh - 56px); }

/* ====== Sidebar ====== */
.sidebar {
  width: 240px; background: #fff; border-right: 1px solid var(--border);
  padding: 20px 0; display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-title { font-size: 12px; font-weight: 700; color: var(--text-light); text-transform: uppercase; padding: 0 20px; margin-bottom: 8px; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  font-size: 15px; color: var(--text-dim); cursor: pointer; border: none; background: none; width: 100%;
  text-align: left; transition: all 0.2s;
}
.sidebar-item:hover { background: #f9fafb; color: var(--text); }
.sidebar-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; border-right: 3px solid var(--primary); }
.sidebar-icon { font-size: 18px; }
.sidebar-bottom { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border); }
.agent-status { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.agent-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.agent-dot.online { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.agent-dot.offline { background: #d1d5db; }
.agent-label { font-size: 14px; font-weight: 600; }
.agent-sub { font-size: 12px; color: var(--text-dim); }

/* ====== Main Content ====== */
.main-content { flex: 1; padding: 32px; overflow-y: auto; }
.view { display: none; }
.view.active { display: block; }
.view-header { margin-bottom: 24px; }
.view-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.view-header p { color: var(--text-dim); }

/* ====== Chat ====== */
.chat-container { display: flex; flex-direction: column; height: calc(100vh - 200px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 0 4px; }
.chat-msg { display: flex; gap: 12px; margin-bottom: 20px; }
.chat-msg.user { flex-direction: row-reverse; }
.msg-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.chat-msg.ai .msg-avatar { background: var(--primary-light); }
.chat-msg.user .msg-avatar { background: #f3f4f6; }
.msg-content { max-width: 70%; padding: 12px 16px; border-radius: 12px; }
.chat-msg.ai .msg-content { background: #f9fafb; border: 1px solid var(--border); }
.chat-msg.user .msg-content { background: var(--primary); color: #fff; }
.msg-content p { margin-bottom: 8px; }
.chat-suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.suggestion-chip {
  padding: 6px 14px; background: #fff; border: 1px solid var(--border); border-radius: 20px;
  font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.suggestion-chip:hover { border-color: var(--primary); color: var(--primary); }
.chat-input-area { border-top: 1px solid var(--border); padding-top: 16px; }
.chat-input-wrapper { display: flex; gap: 8px; }
.chat-input {
  flex: 1; padding: 10px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px;
  resize: none; font-family: inherit; outline: none; transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--primary); }
.chat-meta { font-size: 12px; color: var(--text-dim); margin-top: 8px; text-align: right; }
.chat-meta .voice-status { margin-left: 12px; color: var(--warn); }
.btn-voice { background: #f3f4f6; color: var(--primary); border: 1px solid var(--border); padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-voice:hover { background: var(--primary-light); }
.btn-voice.recording { background: #fee2e2; color: #dc2626; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.btn-speak { background: transparent; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; margin-top: 4px; padding: 2px 4px; }
.btn-speak:hover { color: var(--primary); }
.btn-speak.speaking { color: var(--danger); animation: pulse 1.2s infinite; }

/* ====== Disk ====== */
.disk-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.disk-card { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.disk-icon { font-size: 32px; }
.disk-info { flex: 1; }
.disk-label { font-weight: 700; margin-bottom: 8px; }
.disk-bar-wrap { height: 8px; background: #f3f4f6; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.disk-bar { height: 100%; border-radius: 4px; transition: width 0.5s; }
.disk-detail { font-size: 13px; color: var(--text-dim); }
.disk-demo-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.demo-banner { background: #fef3c7; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 16px; margin-bottom: 20px; font-size: 14px; color: #92400e; }
.disk-treemap { display: flex; gap: 2px; height: 48px; border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.treemap-item { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 600; overflow: hidden; white-space: nowrap; }
.disk-top-files h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); font-size: 13px; color: var(--text-dim); font-weight: 600; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.badge-cleanable { padding: 2px 10px; background: #d1fae5; color: #065f46; border-radius: 4px; font-size: 12px; font-weight: 600; }
.badge-warn { padding: 2px 10px; background: #fef3c7; color: #92400e; border-radius: 4px; font-size: 12px; font-weight: 600; }

/* ====== Health ====== */
.health-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.health-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.health-icon { font-size: 28px; margin-bottom: 8px; }
.health-label { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.health-value { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.health-bar { height: 6px; background: #f3f4f6; border-radius: 3px; overflow: hidden; }
.health-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.health-report { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.health-report h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.report-loading { text-align: center; padding: 32px; }
.report-loading p { color: var(--text-dim); margin-bottom: 16px; }
.report-content { line-height: 1.8; }
.report-content h4 { font-size: 15px; font-weight: 700; margin: 16px 0 8px; color: var(--primary); }
.report-content p { margin-bottom: 8px; color: var(--text); }
.report-content ul { margin: 4px 0 12px 20px; }
.report-content li { margin-bottom: 4px; }

/* ====== Clean ====== */
.clean-locked { text-align: center; padding: 48px 24px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.locked-icon { font-size: 48px; margin-bottom: 16px; }
.clean-locked h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.clean-locked p { color: var(--text-dim); margin-bottom: 24px; }
.locked-trial { color: var(--success); font-weight: 600; margin-top: 8px; }
.clean-summary { display: flex; gap: 24px; margin-bottom: 24px; }
.clean-stat { flex: 1; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.clean-stat-val { font-size: 32px; font-weight: 800; color: var(--primary); }
.clean-stat-lbl { font-size: 14px; color: var(--text-dim); }
.clean-list { margin-bottom: 24px; }

/* ====== Account ====== */
.account-info { max-width: 500px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.account-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.account-label { color: var(--text-dim); font-size: 14px; }
.account-value { font-weight: 600; }
.account-actions { margin-top: 24px; }

/* ====== Subscribe ====== */
.subscribe-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 700px; }
.sub-plan-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px 28px; text-align: center; position: relative; }
.sub-plan-featured { border: 2px solid var(--primary); }
.sub-plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.sub-plan-name { font-size: 18px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; }
.sub-plan-price { font-size: 36px; font-weight: 800; }
.sub-period { font-size: 16px; font-weight: 500; color: var(--text-dim); }
.sub-plan-trial { font-size: 14px; color: var(--success); font-weight: 600; margin: 8px 0 20px; }
.sub-plan-features { text-align: left; margin-bottom: 24px; }
.sub-plan-features li { padding: 6px 0; font-size: 14px; }

/* ====== Modal ====== */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: #fff; border-radius: 16px; padding: 32px; max-width: 400px; width: 90%; text-align: center; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { border: none; background: none; font-size: 20px; cursor: pointer; color: var(--text-dim); }
.payment-qr { margin-bottom: 20px; }
.qr-placeholder { height: 200px; display: flex; align-items: center; justify-content: center; background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; }
.qr-loading { color: var(--text-dim); font-size: 14px; }
.payment-info { }
.payment-plan { font-size: 14px; color: var(--text-dim); margin-bottom: 4px; }
.payment-amount { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.payment-status { font-size: 14px; color: var(--text-dim); }

/* ====== CSP-safe helper classes (替代内联style属性) ====== */
.hidden { display: none; }
.disk-bar { width: 0%; }
.health-bar-fill { width: 0%; }
.faq-item.border-success { border-left: 4px solid var(--success); }
.faq-item.border-primary { border-left: 4px solid var(--primary); }
.faq-item.border-accent { border-left: 4px solid var(--accent); }
.faq-item.border-warn { border-left: 4px solid var(--warn); }
.treemap-item.t1 { flex: 28; background: #ef4444; }
.treemap-item.t2 { flex: 18; background: #f59e0b; }
.treemap-item.t3 { flex: 12; background: #8b5cf6; }
.treemap-item.t4 { flex: 8; background: #06b6d4; }
.treemap-item.t5 { flex: 6; background: #10b981; }
.treemap-item.t6 { flex: 4; background: #ec4899; }
.treemap-item.t7 { flex: 3; background: #6b7280; }

/* ====== New Feature Views ====== */
.panel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}
.drop-zone:hover { border-color: var(--primary); background: var(--primary-light); }
.drop-zone.dragover { border-color: var(--primary); background: #eef2ff; }
.drop-icon { font-size: 48px; margin-bottom: 12px; }
.drop-hint { display: block; font-size: 13px; color: var(--text-light); margin-top: 8px; }

.action-bar { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.action-chip { padding: 8px 18px; }

.result-area {
  min-height: 160px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  line-height: 1.8;
}
.result-area p { margin-bottom: 8px; }
.empty-state { text-align: center; color: var(--text-light); padding: 32px; }
.info-message { color: var(--primary); font-weight: 600; }

.data-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
}
.data-input:focus { border-color: var(--primary); }

.research-input-wrap { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.research-input {
  flex: 1;
  min-width: 240px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  outline: none;
}
.research-input:focus { border-color: var(--primary); }
.research-select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.hub-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: all 0.2s;
}
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.hub-icon { font-size: 36px; margin-bottom: 12px; }
.hub-name { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.hub-desc { font-size: 13px; color: var(--text-dim); }

.hub-tip { margin-top: 0; }
.hub-tip p { margin-bottom: 12px; color: var(--text-dim); }

.butler-status {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.butler-status-icon { font-size: 32px; }
.butler-status-text { flex: 1; }
.butler-status-label { font-weight: 700; margin-bottom: 4px; }
.butler-status-sub { font-size: 13px; color: var(--text-dim); }

.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.capability-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.capability-item:hover { border-color: var(--primary); background: var(--primary-light); }
.capability-icon { font-size: 28px; margin-bottom: 8px; }
.capability-name { font-size: 14px; font-weight: 600; }

.qr-image { width: 200px; height: 200px; }

/* ====== Companion Chat ====== */
.companion-container { height: calc(100vh - 200px); }
.companion-messages { background: linear-gradient(180deg, #fef3f2 0%, #fff7ed 100%); border-radius: 12px; padding: 16px 12px; }
.companion-avatar { background: #fed7aa !important; }
.companion-bubble { background: #fff7ed !important; border: 1px solid #fed7aa !important; }
.companion-chip { border-color: #fdba74 !important; }
.companion-chip:hover { border-color: #f97316 !important; color: #f97316 !important; background: #fff7ed !important; }

/* ====== Tutor ====== */
.tutor-config { margin-bottom: 20px; }
.tutor-field { margin-bottom: 16px; }
.tutor-label { display: block; font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.tutor-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tutor-chip {
  padding: 6px 16px; border: 1px solid var(--border); border-radius: 20px;
  background: #fff; font-size: 14px; cursor: pointer; transition: all 0.2s; color: var(--text-dim);
}
.tutor-chip:hover { border-color: var(--primary); color: var(--primary); }
.tutor-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.tutor-quick { margin-bottom: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tutor-quick-label { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.tutor-quick-chip { font-size: 13px; }

.tutor-input-wrap { display: flex; gap: 12px; margin-bottom: 12px; }
.tutor-input { flex: 1; }
.tutor-mode-row { margin-bottom: 20px; }
.tutor-mode-label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-dim); cursor: pointer; }
.tutor-mode-label input { width: 16px; height: 16px; cursor: pointer; }

/* ====== Responsive ====== */
@media (max-width: 768px) {
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .hero h1 { font-size: 32px; }
  .hero-stats { gap: 20px; }
  .sidebar { display: none; }
  .app-layout { flex-direction: column; }
  .disk-summary { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: 1fr 1fr; }
  .subscribe-plans { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .capability-grid { grid-template-columns: 1fr 1fr; }
  .research-input-wrap { flex-direction: column; align-items: stretch; }
  .research-input, .research-select, .research-input-wrap .btn { width: 100%; }
  .tutor-input-wrap { flex-direction: column; }
  .tutor-chips { gap: 6px; }
  .tutor-chip { font-size: 13px; padding: 5px 12px; }
}


/* ===== 产品矩阵返回入口（白底顶栏场景，深色样式）） */
.portal-link {
  display: inline-block;
  margin-right: 12px;
  padding: 6px 14px;
  border: 1px solid rgba(15, 23, 42, 0.22);
  border-radius: 8px;
  color: #1e293b !important;
  background: rgba(15, 23, 42, 0.04);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
  vertical-align: middle;
  transition: background 0.2s, border-color 0.2s;
}
.portal-link:hover {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.4);
  color: #0f172a !important;
}
