/**
 * settings-help.css — 设置与帮助页面样式
 * 覆盖 8 个页面：隐私设置/平台权限/协作者权限/数据导出/数据删除/帮助中心/服务协议/关于智慧宫
 * BEM 命名 + 精确 hex 色值
 */

/* ========== 公共变量与基础 ========== */
.privacy-layout,
.platform-perm-layout,
.collab-perm-layout,
.data-export-layout,
.data-delete-layout,
.help-layout,
.agreement-layout,
.about-layout {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  color: #333333;
}

.sh-page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #333333;
}

.sh-card {
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.sh-btn {
  display: inline-block;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  background: #2196F3;
  color: #FFFFFF;
  transition: background 0.2s;
}
.sh-btn:hover { background: #1976D2; }
.sh-btn--danger { background: #F44336; }
.sh-btn--danger:hover { background: #E53935; }
.sh-btn--success { background: #4CAF50; }
.sh-btn--success:hover { background: #43A047; }
.sh-btn--ghost { background: #FFFFFF; color: #666666; border: 1px solid #E0E0E0; }
.sh-btn--ghost:hover { background: #F5F5F5; }
.sh-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sh-empty {
  text-align: center;
  padding: 48px 20px;
  color: #9E9E9E;
}
.sh-empty__icon { font-size: 48px; margin-bottom: 12px; }
.sh-empty__text { font-size: 15px; margin-bottom: 16px; }

.sh-error {
  background: #FFF3E0;
  border: 1px solid #F5A623;
  border-radius: 8px;
  padding: 16px;
  color: #F44336;
  margin-bottom: 16px;
}
.sh-error__retry {
  margin-left: 12px;
  padding: 4px 12px;
  background: #F44336;
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.sh-skeleton {
  background: #F5F5F5;
  border-radius: 4px;
  animation: sh-shimmer 1.5s infinite;
}
@keyframes sh-shimmer { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

.sh-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  padding: 12px 24px;
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sh-toast--success { background: #4CAF50; }
.sh-toast--error { background: #F44336; }
.sh-toast--info { background: #2196F3; }

.sh-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #E0E0E0;
}
.sh-checkbox-row:last-child { border-bottom: none; }
.sh-checkbox-row input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.sh-checkbox-row label { cursor: pointer; flex: 1; color: #333333; }

/* ========== 隐私设置页 ========== */
.privacy-layout { min-height: 400px; }
.privacy-section { margin-bottom: 24px; }
.privacy-section__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #333333;
  padding-bottom: 8px;
  border-bottom: 2px solid #E0E0E0;
}
.privacy-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #E0E0E0;
}
.privacy-switch:last-child { border-bottom: none; }
.privacy-switch__label { font-size: 14px; color: #333333; }
.privacy-switch__desc { font-size: 12px; color: #9E9E9E; margin-top: 4px; }
.privacy-switch__toggle {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: #E0E0E0;
  cursor: pointer;
  transition: background 0.3s;
  border: none;
  flex-shrink: 0;
}
.privacy-switch__toggle--on { background: #4CAF50; }
.privacy-switch__toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.3s;
}
.privacy-switch__toggle--on::after { transform: translateX(22px); }
.privacy-switch__toggle:disabled { opacity: 0.5; cursor: not-allowed; }
.privacy-desensitize {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.privacy-desensitize__option {
  padding: 8px 16px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  cursor: pointer;
  background: #FFFFFF;
  color: #666666;
  font-size: 13px;
}
.privacy-desensitize__option--active {
  border-color: #2196F3;
  color: #2196F3;
  background: #E3F2FD;
}
.privacy-2fa {
  margin-top: 16px;
  padding: 16px;
  background: #F5F5F5;
  border-radius: 8px;
  display: none;
}
.privacy-2fa--open { display: block; }
.privacy-2fa__qr { text-align: center; margin: 12px 0; }
.privacy-2fa__input {
  width: 200px;
  padding: 8px 12px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  letter-spacing: 4px;
}

/* ========== 平台权限管理页 ========== */
.platform-perm-layout { min-height: 400px; }
.platform-perm-group { margin-bottom: 24px; }
.platform-perm-group__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #333333;
  padding-bottom: 8px;
  border-bottom: 2px solid #E0E0E0;
}
.platform-perm-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.platform-perm-item:hover { border-color: #2196F3; }
.platform-perm-item__name { font-size: 14px; font-weight: 500; color: #333333; }
.platform-perm-item__status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}
.platform-perm-item__status--granted { background: #4CAF50; color: #FFFFFF; }
.platform-perm-item__status--denied { background: #F44336; color: #FFFFFF; }
.platform-perm-detail {
  margin-top: 8px;
  padding: 16px;
  background: #F5F5F5;
  border-radius: 8px;
  font-size: 13px;
  color: #666666;
  display: none;
}
.platform-perm-detail--open { display: block; }
.platform-perm-detail__row { margin-bottom: 8px; }
.platform-perm-detail__row:last-child { margin-bottom: 0; }
.platform-perm-detail__label { color: #9E9E9E; }
.platform-perm-detail__actions { margin-top: 12px; display: flex; gap: 8px; }

/* ========== 协作者权限管理页 ========== */
.collab-perm-layout { min-height: 400px; }
.collab-perm-selector {
  margin-bottom: 20px;
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
}
.collab-perm-selector__label { font-size: 14px; color: #666666; margin-bottom: 8px; display: block; }
.collab-perm-selector__select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  font-size: 14px;
  background: #FFFFFF;
  color: #333333;
  cursor: pointer;
}
.collab-perm-search {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.collab-perm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 8px;
}
.collab-perm-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #E0E0E0;
  flex-shrink: 0;
  object-fit: cover;
}
.collab-perm-row__info { flex: 1; }
.collab-perm-row__name { font-size: 14px; font-weight: 500; color: #333333; }
.collab-perm-row__status { font-size: 12px; color: #9E9E9E; margin-top: 2px; }
.collab-perm-role {
  padding: 6px 12px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  font-size: 13px;
  background: #FFFFFF;
  color: #333333;
  cursor: pointer;
}
.collab-perm-row__actions { display: flex; gap: 6px; }
.collab-perm-add-form {
  padding: 16px;
  background: #F5F5F5;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}
.collab-perm-add-form--open { display: block; }
.collab-perm-add-form__input {
  padding: 8px 12px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  font-size: 14px;
  margin-right: 8px;
}
.collab-perm-pager {
  text-align: center;
  padding: 16px 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* ========== 数据导出页 ========== */
.data-export-layout { min-height: 400px; }
.data-export-scope { margin-bottom: 20px; }
.data-export-scope__title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.data-export-format {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.data-export-format__option {
  padding: 10px 20px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  cursor: pointer;
  background: #FFFFFF;
  color: #666666;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}
.data-export-format__option--active {
  border-color: #2196F3;
  color: #2196F3;
  background: #E3F2FD;
}
.data-export-progress {
  margin: 20px 0;
  padding: 20px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
}
.data-export-progress__bar {
  width: 100%;
  height: 24px;
  background: #F5F5F5;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}
.data-export-progress__fill {
  height: 100%;
  background: #4CAF50;
  border-radius: 12px;
  transition: width 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
}
.data-export-progress__stage { font-size: 13px; color: #666666; }
.data-export-history { margin-top: 24px; }
.data-export-history__title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.data-export-history__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
}
.data-export-history__meta { color: #9E9E9E; }

/* ========== 数据删除页 ========== */
.data-delete-layout { min-height: 400px; }
.data-delete-warning {
  background: #FFF3E0;
  border: 2px solid #F44336;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.data-delete-warning__icon { font-size: 24px; color: #F44336; flex-shrink: 0; }
.data-delete-warning__text { color: #F44336; font-size: 14px; font-weight: 500; line-height: 1.5; }
.data-delete-scope { margin-bottom: 20px; }
.data-delete-scope__title { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.data-delete-confirm {
  margin-top: 20px;
  padding: 20px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
}
.data-delete-confirm__dialog {
  margin-top: 16px;
  padding: 16px;
  background: #FFF3E0;
  border-radius: 8px;
  display: none;
}
.data-delete-confirm__dialog--open { display: block; }
.data-delete-confirm__input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #F44336;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  box-sizing: border-box;
  margin: 8px 0;
}
.data-delete-result {
  margin-top: 20px;
  padding: 20px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
}
.data-delete-result__summary { font-size: 14px; color: #333333; line-height: 1.8; }
.data-delete-result__failed {
  margin-top: 12px;
  padding: 12px;
  background: #FFF3E0;
  border-radius: 6px;
  color: #F44336;
  font-size: 13px;
}

/* ========== 帮助中心页 ========== */
.help-layout { min-height: 400px; }
.help-search {
  position: relative;
  margin-bottom: 24px;
}
.help-search__input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.help-search__input:focus { border-color: #2196F3; outline: none; }
.help-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #9E9E9E;
}
.help-category { margin-bottom: 20px; }
.help-category__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #333333;
}
.help-category__icon { margin-right: 8px; }
.help-category__arrow { color: #9E9E9E; transition: transform 0.2s; }
.help-category__arrow--open { transform: rotate(90deg); }
.help-category__docs {
  margin-top: 4px;
  padding-left: 16px;
  display: none;
}
.help-category__docs--open { display: block; }
.help-doc {
  padding: 10px 16px;
  font-size: 14px;
  color: #2196F3;
  cursor: pointer;
  border-bottom: 1px solid #F5F5F5;
}
.help-doc:hover { background: #F5F5F5; }
.help-doc__content {
  padding: 20px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: #333333;
}
.help-doc__content h3 { font-size: 18px; margin: 16px 0 8px; color: #333333; }
.help-doc__content p { margin: 8px 0; color: #666666; }
.help-doc__content code {
  background: #F5F5F5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: #F44336;
}
.help-doc__content pre {
  background: #F5F5F5;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
}
.help-doc__content img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.help-doc__feedback {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #E0E0E0;
  text-align: center;
}
.help-doc__feedback-link {
  color: #2196F3;
  cursor: pointer;
  font-size: 13px;
}

/* ========== 服务协议页 ========== */
.agreement-layout { min-height: 400px; }
.agreement-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid #E0E0E0;
  flex-wrap: wrap;
}
.agreement-tabs__item {
  padding: 10px 20px;
  font-size: 14px;
  color: #666666;
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.agreement-tabs__item--active {
  color: #2196F3;
  border-bottom-color: #2196F3;
  font-weight: 600;
}
.agreement-content {
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 32px;
  font-size: 14px;
  line-height: 1.8;
  color: #333333;
}
.agreement-content h2 { font-size: 20px; margin: 24px 0 12px; color: #333333; }
.agreement-content h3 { font-size: 16px; margin: 20px 0 8px; color: #333333; }
.agreement-content p { margin: 10px 0; color: #666666; }
.agreement-content ul, .agreement-content ol { margin: 10px 0; padding-left: 24px; color: #666666; }
.agreement-content li { margin: 6px 0; }
.agreement-anchor {
  position: sticky;
  top: 20px;
  float: right;
  width: 180px;
  padding: 16px;
  background: #F5F5F5;
  border-radius: 8px;
  font-size: 13px;
  margin-left: 20px;
}
.agreement-anchor__title { font-weight: 600; margin-bottom: 8px; color: #333333; }
.agreement-anchor__link {
  display: block;
  padding: 4px 0;
  color: #2196F3;
  cursor: pointer;
  text-decoration: none;
}
.agreement-anchor__link:hover { text-decoration: underline; }
.agreement-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
  color: #9E9E9E;
}
.agreement-meta__version {
  padding: 6px 12px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #FFFFFF;
  cursor: pointer;
  font-size: 13px;
  color: #333333;
}

/* ========== 关于智慧宫页 ========== */
.about-layout { min-height: 400px; }
.about-hero {
  text-align: center;
  padding: 48px 24px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 12px;
  margin-bottom: 24px;
}
.about-hero__logo { font-size: 64px; margin-bottom: 16px; }
.about-hero__name { font-size: 28px; font-weight: 700; color: #333333; margin: 0 0 8px; }
.about-hero__version { font-size: 14px; color: #9E9E9E; margin-bottom: 16px; }
.about-hero__mission {
  font-size: 15px;
  color: #666666;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}
.about-section { margin-bottom: 24px; }
.about-section__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px;
  color: #333333;
  padding-bottom: 8px;
  border-bottom: 2px solid #E0E0E0;
}
.about-section__item {
  padding: 12px 0;
  border-bottom: 1px solid #E0E0E0;
  font-size: 14px;
  color: #333333;
}
.about-section__item:last-child { border-bottom: none; }
.about-tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.about-tech-stack__card {
  padding: 16px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
}
.about-tech-stack__category { font-size: 12px; color: #9E9E9E; margin-bottom: 4px; }
.about-tech-stack__name { font-size: 14px; font-weight: 500; color: #333333; }
.about-contact {
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  text-align: center;
}
.about-contact__item {
  display: inline-block;
  margin: 0 16px;
  font-size: 14px;
  color: #2196F3;
  cursor: pointer;
}
.about-contact__item:hover { text-decoration: underline; }
.about-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}
.about-links__btn {
  padding: 8px 20px;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  background: #FFFFFF;
  color: #333333;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.about-links__btn:hover { background: #F5F5F5; border-color: #2196F3; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .privacy-layout,
  .platform-perm-layout,
  .collab-perm-layout,
  .data-export-layout,
  .data-delete-layout,
  .help-layout,
  .agreement-layout,
  .about-layout {
    padding: 12px;
  }
  .platform-perm-group {
    margin-bottom: 16px;
  }
  .help-layout {
    display: flex;
    flex-direction: column;
  }
  .help-search__input { font-size: 14px; }
  .agreement-tabs { flex-direction: column; }
  .agreement-tabs__item { border-bottom: 1px solid #E0E0E0; margin-bottom: 0; }
  .agreement-anchor { display: none; }
  .about-tech-stack { grid-template-columns: 1fr; }
  .about-hero { padding: 24px 12px; }
  .about-hero__logo { font-size: 48px; }
  .about-hero__name { font-size: 22px; }
  .data-export-format { flex-wrap: wrap; }
  .collab-perm-row { flex-wrap: wrap; }
  .collab-perm-row__actions { width: 100%; justify-content: flex-end; margin-top: 8px; }
}