/* 通用组件样式 */
dialog::backdrop {
  background: rgba(0, 0, 0, .65);
}

/* 登录页样式 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 28rem;
  background: rgba(24, 24, 27, 0.8);
  border: 1px solid rgba(63, 63, 70, 0.4);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  border-radius: 0.5rem;
}

/* 主应用布局 */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-content {
  flex: 1;
  padding: 1.5rem;
}

/* 页面通用样式 */
.page-panel {
  background: rgba(39, 39, 42, 0.5);
  border: 1px solid rgba(63, 63, 70, 0.4);
  padding: 0.75rem;
  border-radius: 0.375rem;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .page-grid {
    grid-template-columns: 1fr;
  }
}

.panel-left {
  grid-column: span 3;
}

@media (max-width: 1024px) {
  .panel-left {
    grid-column: span 1;
  }
}

.panel-right {
  grid-column: span 7;
}

@media (max-width: 1024px) {
  .panel-right {
    grid-column: span 1;
  }
}



/* 图1底部卡片风格 */
.sb-asset-card{
  border: 1px solid rgba(39,39,42,.9);
  background: rgba(9,9,11,.25);
  border-radius: 12px;
  overflow: hidden;
}

.sb-asset-top{
  display:flex;
  gap:12px;
  padding:12px;
}

.sb-asset-thumb{
  width:72px;
  height:72px;
  border-radius: 12px;
  background: rgba(9,9,11,.45);
  border: 1px dashed rgba(63,63,70,.9);
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(148,163,184,.6);
  flex-shrink:0;
}

.sb-asset-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius: 12px;
}

.sb-asset-name{
  width: 100%;
  background: rgba(9,9,11,.35);
  border: 1px solid rgba(39,39,42,.9);
  color: rgba(226,232,240,1);
  outline: none;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
}

.sb-asset-prompt{
  width: 100%;
  background: rgba(9,9,11,.35);
  border: 1px solid rgba(39,39,42,.9);
  color: rgba(226,232,240,1);
  outline: none;
  border-radius: 10px;
  padding: 8px;
  font-size: 11px;
  resize: none;
  min-height: 64px;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.sb-asset-actions{
  border-top: 1px solid rgba(39,39,42,.9);
  background: rgba(24,24,27,.25);
  padding: 10px 12px;
}

.sb-asset-btn{
  width: 100%;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(39,39,42,.9);
}

/* @mention 编辑器样式 */
.mention-editor {
  min-height: 80px;
  max-height: 180px;
  overflow-y: auto;
  background: rgb(9, 9, 11);
  border: 1px solid rgba(39, 39, 42, 0.75);
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
  outline: none;
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.mention-editor:focus {
  border-color: rgba(39, 39, 42, 0.75);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.4);
}

.mention-editor:empty::before {
  content: attr(data-placeholder);
  color: #6b7280;
  pointer-events: none;
}

/* mention 锚点标签 */
.mention-anchor {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 12px;
  color: #c4b5fd;
  cursor: pointer;
  user-select: none;
}

.mention-anchor:hover {
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
}

.mention-anchor .delete-icon {
  color: #a78bfa;
  font-size: 14px;
  margin-left: 2px;
  line-height: 1;
}

/* @mention 弹出层 */
.mention-popup {
  position: fixed;
  z-index: 9999;
  width: 300px;
  max-height: 240px;
  overflow-y: auto;
  background: #18181b;
  border: 1px solid rgba(63, 63, 70, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.1s;
}

.mention-item:hover,
.mention-item.active {
  background: rgba(139, 92, 246, 0.15);
}

.mention-item-info {
  flex: 1;
  min-width: 0;
}

.mention-item-name {
  font-size: 12px;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-item-type {
  font-size: 10px;
  color: #9ca3af;
}

/* 全局滚动条样式 - 窄边透明 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Firefox 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#toast{
  background-color: #6042d1;
  color:#FFF;
}