:root {
  --bg-color: #f5f5f5;
  --sidebar-bg: #e7e7e7;
  --sidebar-hover: #d6d6d6;
  --sidebar-active: #c6c6c6;
  --chat-bg: #f5f5f5;
  --message-bg-user: #95ec69;
  --message-bg-other: #ffffff;
  --text-color: #000000;
  --border-color: #dcdcdc;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  height: 100vh;
  overflow: hidden;
}

#root {
  height: 100%;
  display: flex;
}

.app-container {
  display: flex;
  width: 100%;
  height: 100%;
}

.sidebar {
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  /* Prevent shrinking */
}

.sidebar-header {
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  -webkit-app-region: drag;
}

.sidebar-footer {
  padding: 10px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.sidebar-btn {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #666;
}

.sidebar-btn:hover {
  color: #333;
}

.sidebar-status {
  color: #07c160;
  font-size: 12px;
}

.search-input {
  width: 100%;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
  -webkit-app-region: no-drag;
}

.date-range-selector {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  justify-content: space-between;
}

.range-btn {
  padding: 2px 6px;
  font-size: 10px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  color: #666;
  flex: 1;
  text-align: center;
}

.range-btn.active {
  background: #07c160;
  color: #fff;
  border-color: #07c160;
}

.contact-list {
  flex: 1;
  overflow-y: auto;
}

.section-header {
  padding: 8px 10px;
  background-color: #f0f0f0;
  font-size: 12px;
  color: #666;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
}

.section-header:hover {
  background-color: #e0e0e0;
}

.section-header .arrow {
  margin-right: 5px;
  font-size: 10px;
  width: 12px;
}

.section-empty {
  padding: 10px 14px 12px 27px;
  color: #888;
  font-size: 12px;
}

.contact-item {
  padding: 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.contact-item:hover {
  background-color: var(--sidebar-hover);
}

.contact-item.active {
  background-color: var(--sidebar-active);
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background-color: #ccc;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.contact-avatar img,
.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-info {
  flex: 1;
  overflow: hidden;
}

.contact-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resizer {
  width: 5px;
  cursor: col-resize;
  background-color: transparent;
  border-right: 1px solid transparent;
  transition: background-color 0.2s;
  z-index: 10;
}

.resizer:hover,
.resizer:active {
  background-color: var(--border-color);
}

.chat-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--chat-bg);
  min-width: 0;
  /* Allow flex item to shrink below content size */
}

.chat-header {
  height: 50px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-weight: bold;
  font-size: 16px;
  -webkit-app-region: drag;
}

.message-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.wechat-message-list {
  padding: 18px 28px;
  background-color: #edf1f2;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 80px 70px, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 120px 120px;
}

.wechat-message-row {
  margin-bottom: 14px;
}

.wechat-message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}

.wechat-message-row.mine {
  justify-content: flex-end;
}

.wechat-system-message-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 2px 0 6px;
}

.wechat-system-message {
  max-width: min(78%, 760px);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(227, 86, 86, 0.1);
  color: #c84a4a;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  word-break: break-word;
}

.wechat-system-message-meta {
  color: #a0a7ab;
  font-size: 11px;
}

.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: #d6d6d6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 38px;
  font-size: 13px;
}

.mine-avatar {
  background: #607d86;
}

.message-stack {
  max-width: min(68%, 720px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.wechat-message-row.mine .message-stack {
  align-items: flex-end;
}

.message-sender-name {
  color: #6f777a;
  font-size: 12px;
  margin: 0 0 4px 2px;
}

.message-bubble {
  position: relative;
  padding: 9px 13px;
  border-radius: 6px;
  background: #fff;
  color: #222;
  font-size: 15px;
  line-height: 1.55;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  word-break: break-word;
}

.wechat-message-row.mine .message-bubble {
  background: #516d76;
  color: #fff;
}

.message-bubble::before {
  content: '';
  position: absolute;
  top: 12px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.wechat-message-row.other .message-bubble::before {
  left: -6px;
  border-right: 6px solid #fff;
}

.wechat-message-row.mine .message-bubble::before {
  right: -6px;
  border-left: 6px solid #516d76;
}

.message-meta {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  color: #9aa1a4;
  font-size: 11px;
}

.message-text {
  min-width: 0;
}

.voice-bubble {
  min-width: 138px;
}

.image-message-bubble {
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  white-space: normal;
}

.wechat-message-row.mine .image-message-bubble {
  background: transparent;
}

.image-message-bubble::before {
  display: none;
}

.image-bubble {
  position: relative;
  max-width: min(260px, 46vw);
  max-height: 220px;
  min-width: 96px;
  min-height: 72px;
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
  cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.image-content {
  display: block;
  max-width: min(260px, 46vw);
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #f7f7f7;
}

.image-loading,
.image-placeholder,
.image-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 18px;
  color: #768184;
  font-size: 13px;
}

.image-placeholder-icon {
  font-size: 22px;
  line-height: 1;
}

.image-actions {
  position: absolute;
  right: 6px;
  bottom: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.image-bubble:hover .image-actions {
  opacity: 1;
}

.image-action-btn {
  border: 0;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  cursor: pointer;
  padding: 4px 6px;
}

.voice-message {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.voice-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.08);
  font-size: 10px;
  line-height: 1;
}

.wechat-message-row.mine .voice-icon {
  background: rgba(255, 255, 255, 0.18);
}

.voice-bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.voice-bars i {
  width: 3px;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.75;
}

.voice-bars i:nth-child(1) {
  height: 7px;
}

.voice-bars i:nth-child(2) {
  height: 13px;
}

.voice-bars i:nth-child(3) {
  height: 9px;
}

.sticker-message {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.sticker-image {
  display: block;
  max-width: 140px;
  max-height: 140px;
  border-radius: 6px;
  object-fit: contain;
}

.sticker-placeholder {
  color: #666;
  font-size: 14px;
}

.sticker-md5 {
  max-width: 180px;
  color: #999;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-message {
  min-width: 160px;
  max-width: 320px;
}

.quoted-message {
  display: flex;
  gap: 4px;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.4;
}

.wechat-message-row.other .quoted-message {
  background: #f0f0f0;
  color: #666;
}

.quoted-sender {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quoted-sender::after {
  content: ':';
}

.quoted-text {
  flex: 0 0 auto;
}

.quote-reply {
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.chat-table th {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid var(--border-color);
  background-color: #f9f9f9;
  color: #666;
  font-weight: normal;
  position: sticky;
  top: 0;
  z-index: 1;
  position: relative;
  /* For resizer positioning */
}

.column-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  z-index: 2;
}

.column-resizer:hover {
  background-color: #ccc;
}

.chat-table td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  color: #333;
}

.chat-table tr:hover {
  background-color: #f0f0f0;
}

.col-sender {
  width: 80px;
}

.col-type {
  width: 80px;
}

.col-time {
  width: 150px;
}

.col-content {
}

.chat-toolbar {
  padding: 10px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  background-color: #fff;
  flex-wrap: wrap;
}

.toolbar-btn {
  padding: 4px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background-color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-btn:hover {
  background-color: #f5f5f5;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
}

.login-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-box {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 360px;
  text-align: center;
}

.login-input {
  width: 100%;
  padding: 8px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-wrapper .login-input {
  padding-right: 40px;
  margin: 10px 0 10px 0;
}

.login-input-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 18px;
}

.login-btn {
  background-color: #07c160;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}

.login-btn:hover {
  background-color: #06ad56;
}

.login-btn:disabled {
  cursor: wait;
  opacity: 0.65;
}

.login-btn-secondary {
  border: 1px solid #cfd5d8;
  background: #fff;
  color: #30383d;
}

.login-btn-secondary:hover {
  border-color: #07c160;
  background: #f2fbf6;
  color: #078f49;
}

.login-clear-btn {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: #8a949a;
  cursor: pointer;
  font-size: 12px;
}

.login-clear-btn:hover {
  color: #d33b3b;
}

.login-key-status {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f3f5f6;
  color: #59636a;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

.login-key-status.success {
  background: #eefaf3;
  color: #078f49;
}

.login-key-status.error {
  background: #fff1f0;
  color: #c73737;
}

.login-key-help-link {
  display: inline-block;
  margin-top: 9px;
  color: #1677ff;
  font-size: 12px;
  text-decoration: none;
}

.login-key-help-link:hover {
  text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  min-width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
}

.ai-settings-modal {
  width: min(460px, 90vw);
}

.ai-settings-modal h3 {
  margin: 0 0 18px;
}

.ai-filter-section {
  margin-bottom: 16px;
}

.ai-filter-label {
  margin-bottom: 7px;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.ai-date-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ai-date-options label {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border: 1px solid #d8dcdf;
  border-radius: 6px;
  background: #fff;
  color: #4a5257;
  cursor: pointer;
  font-size: 13px;
}

.ai-date-options label.selected {
  border-color: #07c160;
  background: #eefaf3;
  color: #078f49;
}

.ai-date-options input,
.ai-type-options input {
  margin: 0;
  accent-color: #07c160;
}

.ai-type-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 11px;
  border: 1px solid #e1e4e6;
  border-radius: 6px;
  background: #f8f9fa;
}

.ai-type-options label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #3f474c;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.image-preview-modal {
  width: min(520px, 92vw);
  max-height: 88vh;
  background: #f7f8fa;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  padding: 16px;
  overflow: hidden;
}

.report-preview-frame {
  border: 1px solid #d8dde3;
  border-radius: 10px;
  background: #eef1f4;
  padding: 12px;
}

.report-preview-scroller {
  max-height: calc(88vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.report-preview-image {
  display: block;
  width: min(430px, 100%);
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid #ccd3d9;
  background: #fff;
}

.report-preview-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.image-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 28, 0.28);
  backdrop-filter: blur(1px);
}

.image-viewer-window {
  width: min(900px, 86vw);
  height: min(700px, 82vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: #eaf0f1;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.image-viewer-titlebar {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.78);
  color: #333;
  font-size: 14px;
}

.image-viewer-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-viewer-title {
  margin-right: 8px;
  font-weight: 500;
}

.image-viewer-zoom {
  min-width: 44px;
  color: #666;
  text-align: center;
}

.image-viewer-divider {
  width: 1px;
  height: 18px;
  background: rgba(0, 0, 0, 0.12);
}

.image-viewer-titlebar button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.image-viewer-titlebar button:hover {
  background: rgba(0, 0, 0, 0.08);
}

.image-viewer-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: auto;
  cursor: grab;
  user-select: none;
}

.image-viewer-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.12);
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  user-select: none;
  pointer-events: none;
}

/* Voice Player */
.voice-message {
  cursor: pointer;
  user-select: none;
}

.voice-loading {
  opacity: 0.6;
}

.voice-error {
  opacity: 0.8;
}

.voice-loading-text {
  font-size: 12px;
  color: #999;
}

.voice-error-text {
  color: #999;
}

.voice-duration {
  font-size: 12px;
  margin-left: 4px;
  min-width: 32px;
}

.voice-icon.playing {
  background: rgba(0, 0, 0, 0.15);
}

/* Rich Message Bubbles */
.location-message {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 180px;
  max-width: 280px;
}

.location-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.location-info {
  flex: 1;
  overflow: hidden;
}

.location-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-label {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-coords {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}

.wechat-message-row.mine .location-message {
  flex-direction: row-reverse;
}

.card-message {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
  max-width: 240px;
}

.card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #07c160;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  flex-shrink: 0;
}

.card-info {
  flex: 1;
  overflow: hidden;
}

.card-nickname {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-username {
  font-size: 12px;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-username:hover {
  color: #07c160;
}

.share-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  min-width: 180px;
  max-width: 280px;
}

.share-appname {
  font-size: 11px;
  color: #999;
}

.share-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-desc {
  font-size: 12px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.share-url {
  font-size: 11px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voip-message {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.voip-icon {
  font-size: 16px;
}

.voip-status {
  font-size: 13px;
}

/* Sidebar 自助卡片 + 入口 */
.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background-color: #f3f4f5;
  transition: background-color 0.15s ease;
  user-select: none;
}

.sidebar-footer:hover {
  background-color: #e6e9eb;
}

.sidebar-self-avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background-color: #07c160;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-self-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-self-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-self-nickname {
  font-size: 13px;
  font-weight: 500;
  color: #1f2429;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-self-wxid {
  font-size: 11px;
  color: #8a9298;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-self-arrow {
  color: #8a9298;
  font-size: 18px;
  flex-shrink: 0;
}

/* 启动自动连接 Splash */
.boot-splash {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(180deg, #f5f7f8 0%, #eceff1 100%);
  z-index: 2000;
  animation: boot-splash-fade-in 0.2s ease-out;
}

@keyframes boot-splash-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.boot-splash-spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(7, 193, 96, 0.18);
  border-top-color: #07c160;
  animation: boot-splash-spin 0.9s linear infinite;
}

@keyframes boot-splash-spin {
  to {
    transform: rotate(360deg);
  }
}

.boot-splash-title {
  font-size: 15px;
  font-weight: 500;
  color: #1f2429;
}

.boot-splash-subtitle {
  font-size: 12px;
  color: #6f767c;
}

/* 设置面板 */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 21, 26, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: settings-fade-in 0.16s ease-out;
}

@keyframes settings-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.settings-modal {
  width: min(560px, 92vw);
  max-height: 84vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15, 21, 26, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: settings-pop-in 0.18s ease-out;
}

@keyframes settings-pop-in {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #ececec;
}

.settings-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #1f2429;
}

.settings-close {
  background: transparent;
  border: 0;
  color: #7d858a;
  font-size: 26px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.settings-close:hover {
  background: #f0f2f4;
  color: #1f2429;
}

.settings-body {
  padding: 12px 22px 22px;
  overflow-y: auto;
}

.settings-section {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fafbfc;
  border: 1px solid #ececec;
}

.settings-section:first-child {
  margin-top: 6px;
}

.settings-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #6f767c;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.settings-row:first-child {
  margin-top: 0;
}

.settings-input {
  flex: 1;
  min-width: 0;
  padding: 8px 11px;
  border: 1px solid #d4d9dc;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  color: #1f2429;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-input:focus {
  border-color: #07c160;
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.12);
}

.settings-input-half {
  flex: 0 1 140px;
}

.settings-input-quarter {
  flex: 0 1 90px;
}

.settings-btn {
  padding: 7px 14px;
  border: 1px solid #d4d9dc;
  border-radius: 6px;
  background: #fff;
  color: #30383d;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.settings-btn:hover:not(:disabled) {
  border-color: #07c160;
  color: #078f49;
}

.settings-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.settings-btn-primary {
  background: #07c160;
  color: #fff;
  border-color: #07c160;
}

.settings-btn-primary:hover:not(:disabled) {
  background: #06ad56;
  color: #fff;
  border-color: #06ad56;
}

.settings-hint {
  margin-top: 10px;
  font-size: 11px;
  color: #8a9298;
  line-height: 1.6;
}

.settings-hint code {
  background: #eef0f2;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10.5px;
}

.settings-status {
  font-size: 12px;
  color: #59636a;
}

.settings-status.ok {
  color: #078f49;
}

.settings-status.fail {
  color: #c73737;
}

.settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #30383d;
}

.settings-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #07c160;
  cursor: pointer;
}

.settings-self {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-self-avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #07c160;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 500;
  overflow: hidden;
  flex-shrink: 0;
}

.settings-self-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-self-info {
  flex: 1;
  min-width: 0;
}

.settings-self-nickname {
  font-size: 15px;
  font-weight: 600;
  color: #1f2429;
}

.settings-self-wxid {
  font-size: 12px;
  color: #6f767c;
  margin-top: 2px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}

.settings-self-account {
  font-size: 11px;
  color: #8a9298;
  margin-top: 2px;
  word-break: break-all;
}

.settings-self-empty {
  font-size: 13px;
  color: #8a9298;
}

.settings-path {
  display: inline-block;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 11px;
  background: #eef0f2;
  padding: 3px 7px;
  border-radius: 4px;
  color: #30383d;
  word-break: break-all;
  max-width: 100%;
}
