/* Service Standard — 统一服务规范样式 */

/* ── ServiceBar（固定右上角） ── */
.ss-bar {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: #374151;
}

.ss-bar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e5e7eb;
}

.ss-bar-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.ss-bar-name {
  font-weight: 500;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 公司徽章 */
.ss-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}

.ss-badge-yongku {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.ss-badge-jiheniao {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* 公司切换按钮 */
.ss-switch-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  padding: 3px 8px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1;
  transition: all 0.2s;
}
.ss-switch-btn:hover { background: #e5e7eb; color: #374151; }

/* 分隔符 */
.ss-sep {
  width: 1px;
  height: 16px;
  background: #e5e7eb;
  flex-shrink: 0;
}

/* 版本号 */
.ss-version {
  color: #9ca3af;
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}
.ss-version:hover { color: #6366f1; }

/* 工具按钮 */
.ss-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #9ca3af;
  font-size: 15px;
  line-height: 1;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.ss-btn:hover { color: #374151; }

/* 返回门户 */
.ss-portal-link {
  color: #6366f1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  white-space: nowrap;
}
.ss-portal-link:hover { background: #e0e7ff; color: #4338ca; }
.ss-portal-link svg { flex-shrink: 0; }
.ss-portal-text { font-size: 12px; }

/* ── Modal 通用 ── */
.ss-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.ss-overlay.ss-visible {
  opacity: 1;
  pointer-events: auto;
}

.ss-modal {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ss-modal h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px;
}

.ss-modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  line-height: 1;
}
.ss-modal-close:hover { color: #374151; }

/* ── Feedback Modal ── */
.ss-feedback-category {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ss-feedback-category label {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #6b7280;
  transition: all 0.2s;
}

.ss-feedback-category input[type="radio"] { display: none; }
.ss-feedback-category input:checked + span {
  /* handled by JS adding class */
}
.ss-feedback-category label.ss-selected {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4338ca;
}

.ss-feedback-textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.ss-feedback-textarea:focus { border-color: #6366f1; }
.ss-feedback-textarea::placeholder { color: #d1d5db; }

.ss-feedback-submit {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.ss-feedback-submit:hover { background: #4f46e5; }
.ss-feedback-submit:disabled { background: #c7d2fe; cursor: not-allowed; }

/* ── Changelog Modal ── */
.ss-changelog-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ss-changelog-item {
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.ss-changelog-item:last-child { border-bottom: none; }

.ss-changelog-version {
  font-size: 12px;
  font-weight: 600;
  color: #6366f1;
  min-width: 50px;
}

.ss-changelog-date {
  font-size: 11px;
  color: #9ca3af;
  min-width: 80px;
}

.ss-changelog-text {
  font-size: 13px;
  color: #374151;
}

/* ── Toast ── */
.ss-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #10b981;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
}
.ss-toast.ss-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
