:root {
    --background-primary: #1a1a1a;
    --background-secondary: #161616;
    --text-normal: #dcddde;
    --text-muted: #999;
    --text-accent: #7b68ee;
    --interactive-accent: #7b68ee;
    --background-modifier-border: #333;
    --background-modifier-form-field: rgba(0, 0, 0, 0.2);
    --background-modifier-hover: rgba(123, 104, 238, 0.1);
    --graph-node: #ffffff;
    --graph-node-company: #ffffff;
    --graph-line: rgba(255, 255, 255, 0.3);
    --glow-contact: rgba(255, 255, 255, 0.6);
    --glow-company: rgba(255, 255, 255, 0.8);
  }
  
body {
    background-color: var(--background-primary);
    color: var(--text-normal);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    overflow: hidden;
    height: 100vh;
  }
  
.app-container {
    display: flex;
    height: 100vh;
  }
  
.sidebar {
width: 300px;
background-color: var(--background-secondary);
border-right: 1px solid var(--background-modifier-border);
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}

.main-content {
flex: 1;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}

.sidebar-header {
padding: 24px 20px;
border-bottom: 1px solid var(--background-modifier-border);
text-align: center;
background: linear-gradient(135deg, var(--background-secondary) 0%, rgba(123, 104, 238, 0.05) 100%);
}

.sidebar-title {
font-size: 24px;
font-weight: 700;
margin: 0;
color: var(--text-accent);
letter-spacing: 0.5px;
text-shadow: 0 0 10px rgba(123, 104, 238, 0.3);
}

.navigation-grid {
padding: 20px 15px;
border-bottom: 1px solid var(--background-modifier-border);
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr;
gap: 12px;
}

.nav-button {
padding: 16px 12px;
cursor: pointer;
color: var(--text-muted);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
background-color: var(--background-modifier-form-field);
transition: all 0.2s ease;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
min-height: 60px;
}

.nav-button:hover {
background-color: var(--background-modifier-hover);
border-color: var(--interactive-accent);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(123, 104, 238, 0.15);
}

.nav-button.active {
color: var(--text-accent);
border-color: var(--interactive-accent);
background-color: rgba(123, 104, 238, 0.1);
box-shadow: 0 0 0 1px var(--interactive-accent);
}

.nav-button i {
font-size: 20px;
margin-bottom: 6px;
}

.nav-button span {
font-size: 12px;
font-weight: 500;
line-height: 1;
}

.add-button {
position: fixed;
bottom: 20px;
left: 320px;
width: 50px;
height: 50px;
border-radius: 50%;
background-color: var(--interactive-accent);
color: white;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border: none;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
transition: all 0.2s;
z-index: 100;
}

.add-button:hover {
background-color: rgba(123, 104, 238, 0.8);
transform: scale(1.05);
}

.add-button i {
font-size: 24px;
margin: 0;
}

.list-container {
flex: 1;
overflow-y: auto;
padding: 20px 15px;
background: linear-gradient(180deg, transparent 0%, rgba(123, 104, 238, 0.02) 100%);
}

.list-item {
padding: 8px 10px;
margin-bottom: 5px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s;
display: flex;
align-items: center;
}

.list-item:hover {
background-color: var(--background-modifier-hover);
}

.list-item.active {
background-color: var(--background-modifier-hover);
}

.list-item .avatar {
width: 32px;
height: 32px;
border-radius: 50%;
margin-right: 10px;
object-fit: cover;
background-color: var(--background-modifier-border);
}

.list-item .item-info {
flex: 1;
}

.list-item .item-title {
font-weight: 500;
margin-bottom: 2px;
}

.list-item .item-subtitle {
font-size: 12px;
color: var(--text-muted);
}

.graph-container {
flex: 1;
position: relative;
overflow: hidden;
}

.detail-panel {
display: none;
position: absolute;
top: 15px;
right: 15px;
width: 300px;
max-width: 90%;
background-color: var(--background-secondary);
border-radius: 8px;
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
z-index: 1000;
padding: 15px;
max-height: calc(100% - 30px);
overflow-y: auto;
transition: opacity 0.3s ease;
opacity: 0;
}

.detail-panel.visible {
display: block;
opacity: 1;
}

.detail-header {
border-bottom: 1px solid var(--background-modifier-border);
padding-bottom: 10px;
margin-bottom: 10px;
}

.detail-title {
font-size: 18px;
font-weight: 600;
margin: 0 0 5px 0;
}

.detail-subtitle {
font-size: 14px;
color: var(--text-muted);
margin-top: 0;
margin-bottom: 15px;
}

.detail-close {
position: absolute;
top: 10px;
right: 10px;
cursor: pointer;
color: var(--text-muted);
transition: color 0.2s;
}

.detail-close:hover {
color: var(--text-normal);
}

.detail-content {
margin-bottom: 15px;
}

.detail-section {
margin-bottom: 15px;
}

.detail-section-title {
font-size: 14px;
font-weight: 600;
margin: 0 0 5px 0;
color: var(--text-accent);
}

.detail-connections {
display: flex;
flex-wrap: wrap;
gap: 5px;
}

.connection-tag {
font-size: 12px;
background-color: var(--background-modifier-hover);
padding: 3px 8px;
border-radius: 4px;
cursor: pointer;
}

.connection-tag:hover {
background-color: var(--interactive-accent);
color: white;
}

.toolbar {
position: absolute;
bottom: 15px;
right: 15px;
z-index: 10;
display: flex;
gap: 10px;
}

.toolbar-button {
width: 36px;
height: 36px;
border-radius: 50%;
background-color: var(--background-secondary);
color: var(--text-normal);
border: 1px solid var(--background-modifier-border);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
}

.toolbar-button:hover {
background-color: var(--interactive-accent);
color: white;
}

.legend {
display: none; /* 隐藏图例 */
}

.legend-item {
display: none; /* 隐藏图例项 */
}

.legend-color {
display: none; /* 隐藏图例颜色标记 */
}

/* 自定义渲染的Canvas样式 */
canvas {
opacity: 0.95;
}

.detail-avatar {
width: 80px;
height: 80px;
border-radius: 50%;
margin: 0 auto 15px;
display: block;
object-fit: cover;
background-color: var(--background-modifier-border);
}

.contact-info {
margin-bottom: 10px;
}

.contact-info-item {
display: flex;
align-items: center;
margin-bottom: 5px;
}

.contact-info-item i {
width: 20px;
margin-right: 10px;
color: var(--text-accent);
}

/* 现代化模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 20px;
}

.modal.visible {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--background-primary);
  margin: auto;
  border: none;
  border-radius: 20px;
  width: 100%;
  max-width: 700px;
  min-height: auto;
  max-height: calc(100vh - 40px);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* 模态框动画效果 */
@keyframes modalSlideIn {
  from {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 通知系统样式 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification.success {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border-left: 4px solid #1e8449;
}

.notification.error {
  background: linear-gradient(135deg, #e74c3c, #ec7063);
  border-left: 4px solid #c0392b;
}

.notification.info {
  background: linear-gradient(135deg, #3498db, #5dade2);
  border-left: 4px solid #2980b9;
}

.notification i {
  font-size: 16px;
  flex-shrink: 0;
}

.notification span {
  flex: 1;
}

/* 移动端通知样式 */
@media (max-width: 768px) {
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    transform: translateY(-100px);
  }
  
  .notification.show {
    transform: translateY(0);
  }
}

/* 移动端模态框响应式设计 */
@media (max-width: 768px) {
  .modal {
    padding: 10px;
    align-items: flex-start;
  }
  
  .modal-content {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 20px);
    margin: 0;
    border-radius: 16px;
  }
  
  .modal-header {
    padding: 20px 20px 16px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .modal-subtitle {
    font-size: 13px;
  }
  
  .modal-nav-container {
    padding: 0 20px;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .modal-nav-tab {
    padding: 12px 8px;
    font-size: 13px;
  }
  
  .modal-nav-tab-icon {
    font-size: 16px;
  }
  
  .modal-body {
    padding: 20px;
    max-height: calc(100vh - 200px);
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .relations-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .modal-footer {
    padding: 16px 20px;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -20px;
  }
  
  .footer-actions {
    width: 100%;
    gap: 12px;
  }
  
  .modal-footer .btn {
    flex: 1;
    min-width: auto;
    padding: 14px 16px;
    font-size: 15px;
  }
}

/* 小屏幕设备优化 */
@media (max-width: 480px) {
  .modal-nav-container {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  
  .modal-nav-tab {
    padding: 14px 12px;
  }
  
  .form-section-header {
    padding: 12px 16px;
  }
  
  .form-section-title {
    font-size: 15px;
  }
  
  .form-group label {
    font-size: 13px;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px 14px;
    font-size: 15px;
  }
  
  .avatar-upload-container {
    padding: 20px;
  }
  
  .avatar-placeholder {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
}

/* 表单元素动画 */
.form-section {
  animation: fadeIn 0.6s ease-out;
}

.form-section:nth-child(2) {
  animation-delay: 0.1s;
}

.form-section:nth-child(3) {
  animation-delay: 0.2s;
}

.form-section:nth-child(4) {
  animation-delay: 0.3s;
}

.modal-nav-tab {
  animation: slideInFromLeft 0.4s ease-out;
}

.modal-nav-tab:nth-child(2) {
  animation-delay: 0.1s;
}

.modal-nav-tab:nth-child(3) {
  animation-delay: 0.2s;
}

.modal-nav-tab:nth-child(4) {
  animation-delay: 0.3s;
}

/* 模态框头部样式 */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 30px;
  border-bottom: 1px solid var(--background-modifier-border);
  background: linear-gradient(135deg, var(--background-primary), var(--background-modifier-form-field));
}

.modal-header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--interactive-accent), rgba(123, 104, 238, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
}

.modal-title-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text-normal);
  letter-spacing: -0.5px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: var(--background-modifier-form-field);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
}

.modal-close:hover {
  background: var(--background-modifier-hover);
  color: var(--text-normal);
  transform: scale(1.05);
}

/* 模态框主体样式 */
.modal-body {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: var(--background-primary);
}

/* 表单卡片样式 */
.form-card {
  background: var(--background-primary);
  border-radius: 16px;
  border: 1px solid var(--background-modifier-border);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-section {
  margin-bottom: 24px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section-header,
.section-header {
  display: flex;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--background-modifier-border);
  background: linear-gradient(135deg, var(--background-primary), var(--background-modifier-form-field));
}

.form-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-normal);
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 24px;
}

/* 表单组样式 */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-normal);
  font-size: 14px;
  margin: 0;
  transition: color 0.3s ease;
}

.form-group-icon {
  font-size: 16px;
  color: var(--interactive-accent);
  transition: all 0.3s ease;
}

.required-indicator {
  color: #e74c3c;
  font-size: 12px;
  margin-left: 4px;
}

/* 表单验证状态 */
.form-group.error label {
  color: #e74c3c;
}

.form-group.error .form-group-icon {
  color: #e74c3c;
}

.form-group.success label {
  color: #27ae60;
}

.form-group.success .form-group-icon {
  color: #27ae60;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* 错误消息样式 */
.error-message {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e74c3c;
  font-size: 12px;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.error-message.show {
  opacity: 1;
  transform: translateY(0);
}

.error-message i {
  font-size: 14px;
}

/* 成功消息样式 */
.success-message {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #27ae60;
  font-size: 12px;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s ease;
}

.success-message.show {
  opacity: 1;
  transform: translateY(0);
}

.success-message i {
  font-size: 14px;
}

.form-label {
display: block;
margin-bottom: 5px;
font-size: 14px;
color: var(--text-normal);
}

.form-control {
width: 100%;
background-color: var(--background-modifier-form-field);
border: 1px solid var(--background-modifier-border);
color: var(--text-normal);
border-radius: 4px;
padding: 8px 12px;
}

.form-control:focus {
outline: none;
border-color: var(--interactive-accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--background-modifier-border);
  border-radius: 10px;
  background: var(--background-modifier-form-field);
  color: var(--text-normal);
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--interactive-accent);
  box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.1);
  transform: translateY(-1px);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-select {
width: 100%;
background-color: var(--background-modifier-form-field);
border: 1px solid var(--background-modifier-border);
color: var(--text-normal);
border-radius: 4px;
padding: 8px 12px;
}

.btn {
padding: 8px 15px;
border-radius: 4px;
border: none;
cursor: pointer;
font-size: 14px;
transition: background-color 0.2s;
}

.btn-primary {
background-color: var(--interactive-accent);
color: white;
}

.btn-primary:hover {
background-color: rgba(123, 104, 238, 0.8);
}

.btn-secondary {
background-color: var(--background-modifier-border);
color: var(--text-normal);
}

.btn-secondary:hover {
background-color: rgba(51, 51, 51, 0.8);
}

/* 模态框底部样式 */
.modal-footer {
  display: flex;
  justify-content: center;
  padding: 24px 30px;
  background: linear-gradient(135deg, var(--background-primary), var(--background-modifier-form-field));
  border-top: 1px solid var(--background-modifier-border);
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  margin-left: -30px;
  margin-right: -30px;
  margin-bottom: -30px;
}

.footer-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.modal-footer .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-width: 120px;
  justify-content: center;
}

/* 按钮加载状态 */
.modal-footer .btn.loading {
  cursor: not-allowed;
  opacity: 0.7;
}

.modal-footer .btn.loading .btn-text {
  opacity: 0;
}

.modal-footer .btn.loading .btn-icon {
  opacity: 0;
}

.btn-spinner {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-footer .btn.loading .btn-spinner {
  opacity: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 按钮禁用状态 */
.modal-footer .btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none !important;
}

.modal-footer .btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

.modal-footer .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-footer .btn:hover::before {
  opacity: 1;
}

.modal-footer .btn-cancel {
  background: var(--background-modifier-form-field);
  color: var(--text-normal);
  border: 1px solid var(--background-modifier-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-cancel:hover {
  background: var(--background-modifier-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer .btn-save {
  background: linear-gradient(135deg, var(--interactive-accent), rgba(123, 104, 238, 0.8));
  color: white;
  box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
}

.modal-footer .btn-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(123, 104, 238, 0.4);
}

.modal-footer .btn-icon {
  font-size: 16px;
}

/* 现代化导航标签页样式 */
.modal-nav {
  padding: 20px 30px 0;
  background: var(--background-primary);
}

.modal-nav-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--background-modifier-form-field);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--background-modifier-border);
}

/* 模态框表单容器 */
.modal-form-container {
flex: 1;
overflow-y: auto;
padding-right: 5px;
margin-right: -5px;
}

.modal-form-container::-webkit-scrollbar {
width: 6px;
}

.modal-form-container::-webkit-scrollbar-track {
background: var(--background-modifier-border);
border-radius: 3px;
}

.modal-form-container::-webkit-scrollbar-thumb {
background: var(--text-muted);
border-radius: 3px;
}

.modal-form-container::-webkit-scrollbar-thumb:hover {
background: var(--text-accent);
}

.modal-nav-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modal-nav-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--interactive-accent), rgba(123, 104, 238, 0.8));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
}

.modal-nav-tab:hover {
  color: var(--text-normal);
  transform: translateY(-1px);
}

.modal-nav-tab:hover::before {
  opacity: 0.1;
}

.modal-nav-tab.active {
  color: white;
  font-weight: 600;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
}

.modal-nav-tab.active::before {
  opacity: 1;
}

.modal-nav-tab-icon {
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.modal-nav-tab-text {
  position: relative;
  z-index: 1;
}

/* 编辑模式下禁用标签页切换的样式 */
.edit-mode .modal-nav-tab:not(.active) {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.edit-mode .modal-nav-tab:not(.active):hover {
  transform: none;
  color: var(--text-muted);
}

.edit-mode .modal-nav-tab:not(.active):hover::before {
  opacity: 0;
}

.modal-title {
font-size: 20px;
font-weight: 600;
margin: 0 0 15px 0;
padding-bottom: 5px;
border-bottom: 1px solid var(--background-modifier-border);
}

/* 工作状态选项样式 */
.work-status-options {
display: flex;
flex-direction: row;
justify-content: space-between;
gap: 10px;
margin-bottom: 10px;
}

.work-status-option {
flex: 1;
}

.work-status-input {
display: none;
}

.work-status-label {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 10px;
background-color: var(--background-modifier-form-field);
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
height: 80px;
}

.work-status-label i {
font-size: 24px;
margin-bottom: 8px;
color: var(--text-muted);
}

.work-status-label span {
font-size: 12px;
text-align: center;
}

.work-status-input:checked + .work-status-label {
background-color: var(--background-modifier-hover);
border-color: var(--interactive-accent);
}

.work-status-input:checked + .work-status-label i,
.work-status-input:checked + .work-status-label span {
color: var(--text-accent);
}

.work-status-label:hover {
background-color: var(--background-modifier-hover);
}

.form-section-title {
font-size: 16px;
font-weight: 600;
color: var(--text-accent);
margin: 15px 0 10px 0;
padding-bottom: 5px;
border-bottom: 1px solid var(--background-modifier-border);
}

.detail-actions {
display: flex;
gap: 8px;
margin-bottom: 15px;
}

.detail-actions button {
font-size: 12px;
padding: 4px 10px;
border-radius: 4px;
}

/* 头像上传样式 */
.avatar-upload-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border: 2px dashed var(--background-modifier-border);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--background-modifier-form-field), rgba(123, 104, 238, 0.02));
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.avatar-upload-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--interactive-accent), rgba(123, 104, 238, 0.8));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar-upload-container:hover {
  border-color: var(--interactive-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(123, 104, 238, 0.15);
}

.avatar-upload-container:hover::before {
  opacity: 0.05;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--interactive-accent);
  box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
  position: relative;
  z-index: 1;
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--background-modifier-border), var(--background-modifier-form-field));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 24px;
  border: 3px solid var(--background-modifier-border);
  position: relative;
  z-index: 1;
}

.avatar-upload input[type="file"] {
  display: none;
}

.avatar-upload-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--interactive-accent), rgba(123, 104, 238, 0.8));
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(123, 104, 238, 0.3);
}

.avatar-upload-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(123, 104, 238, 0.4);
}

/* 关联信息网格样式 */
.relations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 24px;
}

.relation-card {
  background: var(--background-modifier-form-field);
  border: 1px solid var(--background-modifier-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.relation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--interactive-accent);
}

.relation-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--background-primary), var(--background-modifier-form-field));
  border-bottom: 1px solid var(--background-modifier-border);
}

.relation-card-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--interactive-accent), rgba(123, 104, 238, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
}

.relation-card-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-normal);
  margin: 0;
}

.relation-card-content {
  padding: 20px;
}

.relation-card select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--background-modifier-border);
  border-radius: 8px;
  background: var(--background-primary);
  color: var(--text-normal);
  font-size: 14px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.relation-card select:focus {
  outline: none;
  border-color: var(--interactive-accent);
  box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.1);
}

.selected-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 12px;
  border: 1px solid var(--background-modifier-border);
  border-radius: 8px;
  background: var(--background-primary);
  transition: all 0.3s ease;
}

.selected-items:hover {
  border-color: var(--interactive-accent);
}

.selected-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--interactive-accent), rgba(123, 104, 238, 0.8));
  color: white;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(123, 104, 238, 0.3);
  transition: all 0.3s ease;
}

.selected-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(123, 104, 238, 0.4);
}

.selected-item .remove-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.selected-item .remove-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* 智能搜索栏样式 */
.search-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  z-index: 1000;
}

.search-bar {
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid var(--background-modifier-border);
  border-radius: 25px;
  padding: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.search-icon {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-normal);
  font-size: 16px;
  padding: 12px 0;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.search-button {
  background: var(--interactive-accent);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.search-button:hover {
  background: #6a5acd;
  transform: scale(1.05);
}

.search-button:active {
  transform: scale(0.95);
}

/* 搜索结果样式 */
.search-results {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 10px;
  background: rgba(26, 26, 26, 0.98);
  border: 1px solid var(--background-modifier-border);
  border-radius: 12px;
  backdrop-filter: blur(15px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  max-height: 400px;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--background-modifier-border);
  background: rgba(123, 104, 238, 0.1);
}

.search-results-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-normal);
}

.search-results-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.search-results-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-normal);
}

.search-results-content {
  padding: 20px;
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.6;
}

.search-results-content p {
  margin: 0 0 12px 0;
  color: var(--text-normal);
}

.search-results-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.search-results-content li {
  margin: 4px 0;
  color: var(--text-normal);
}

/* 搜索加载状态 */
.search-loading {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid var(--background-modifier-border);
  border-radius: 20px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--background-modifier-border);
  border-top: 2px solid var(--interactive-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.search-loading span {
  color: var(--text-muted);
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .search-container {
    width: 95%;
    bottom: 15px;
  }
  
  .search-input {
    font-size: 14px;
  }
  
  .search-input::placeholder {
    font-size: 13px;
  }
  
  .search-results {
    max-height: 300px;
  }
  
  .search-results-content {
    padding: 15px;
    max-height: 220px;
  }
}