/* ===== AI星拓客 · 账户与云同步 UI（复用仓途逻辑，适配星拓客主题） ===== */

/* 首页账户区（兼容 former 侧边栏） */
.home-account-card .card-subtitle { color: var(--muted); }
.home-account-wrap { max-width: 480px; }

/* 侧边栏账户区 */
.sidebar-account {
  margin: 12px 12px 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-soft-2);
}
.account-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.account-section .sidebar-account {
  margin-left: 0;
  margin-right: 0;
}
.account-guest { display: flex; flex-direction: column; gap: 8px; }
.account-guest-row { display: flex; gap: 8px; }
.account-guest-row .account-btn { flex: 1; }
.account-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-soft-3);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: filter .15s, background .15s;
}
.account-btn:hover { filter: brightness(1.12); }
.account-btn.accent { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.account-btn.activate { background: rgba(255, 178, 122, .14); color: var(--warn); border-color: transparent; }
.account-btn.activate:hover { filter: brightness(1.1); }
.account-hint { font-size: 11px; color: var(--muted); line-height: 1.5; }

.account-info { display: flex; flex-direction: column; gap: 6px; }
.account-email {
  font-size: 13px; font-weight: 600; color: var(--ink);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sync-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; display: inline-block; width: fit-content; }
.sync-badge.on { background: var(--brand-soft); color: var(--brand); }
.sync-badge.off { background: var(--tag-bg); color: var(--muted); }
.account-actions { display: flex; gap: 8px; margin-top: 8px; }
.account-mini {
  flex: 1; padding: 7px 10px; border-radius: var(--r-sm);
  background: var(--bg-soft-3); color: var(--ink);
  font-size: 12px; font-weight: 600; border: 1px solid var(--line);
  transition: filter .15s;
}
.account-mini:hover { filter: brightness(1.12); }
.account-mini.accent { background: var(--brand-soft); color: var(--brand); border-color: transparent; }

/* 弹窗内部表单（适配 openModal 的 .modal-body） */
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.form-group .input {
  width: 100%; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--bg-soft); color: var(--ink);
  border: 1px solid var(--line); font-size: 13px;
}
.form-group .input:focus { outline: none; border-color: var(--brand); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.form-actions .btn { min-width: 96px; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.auth-tab {
  flex: 1; padding: 8px; border-radius: var(--r-sm);
  background: var(--bg-soft-3); color: var(--muted);
  font-size: 13px; font-weight: 600; border: 1px solid var(--line);
}
.auth-tab.active { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.auth-tip { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 4px 0 8px; }
.auth-err { color: var(--danger); font-size: 12px; min-height: 16px; margin-top: 4px; }

/* Toast（轻量，避免依赖 ui.js 的 toast 定位冲突） */
.ct-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(10px);
  padding: 11px 18px; border-radius: var(--r-md); font-size: 13px; font-weight: 600;
  color: #fff; background: var(--brand); box-shadow: 0 8px 24px rgba(0,0,0,.35);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 10001;
}
.ct-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ct-toast.err { background: var(--danger); }
.ct-toast.ok { background: var(--brand); }

/* ===== 首页 Hero（品牌首屏） ===== */
.home-hero-card {
  position: relative;
  background: linear-gradient(135deg, var(--bg-soft-2) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  overflow: hidden;
}
.home-hero-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
}
.home-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 4px;
}
.home-hero-main { flex: 1; min-width: 0; }
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}
.home-hero-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.25;
}
.home-hero-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  max-width: 62ch;
}
.home-hero-stats {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}
.home-hero-stat {
  text-align: center;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--bg-soft-2);
  border: 1px solid var(--line);
  min-width: 96px;
}
.home-hero-stat-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}
.home-hero-stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  white-space: nowrap;
}

/* ===== 首页账户区视觉强化 ===== */
.home-account-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--warn);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-soft-2) 100%);
}
.account-card-inner { display: flex; flex-direction: column; gap: 16px; }
.account-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.account-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: rgba(255, 178, 122, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.account-card-titles { flex: 1; min-width: 0; }
.account-card-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.account-card-subtitle {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* 首页未登录按钮强化 */
.account-guest { display: flex; flex-direction: column; gap: 10px; }
.account-guest-row { display: flex; gap: 10px; }
.account-guest-row .account-btn { flex: 1; }
.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
}
.account-btn-icon { font-size: 16px; }
.account-btn.activate {
  background: rgba(255, 178, 122, 0.14);
  color: var(--warn);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(255, 178, 122, 0.08);
}
.account-hint {
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  margin-top: 2px;
}

/* 已登录状态微调 */
.account-actions { gap: 10px; margin-top: 4px; }
.account-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 13px;
}
.account-mini.accent {
  background: rgba(255, 178, 122, 0.14);
  color: var(--warn);
  border-color: transparent;
}

/* 响应式 */
@media (max-width: 640px) {
  .home-hero-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .home-hero-stats { width: 100%; justify-content: flex-start; }
  .home-hero-stat { flex: 1; min-width: auto; }
  .home-hero-title { font-size: 22px; }
  .account-card-head { align-items: center; }
  .account-guest-row { flex-direction: column; }
}
