/* Extension tooltip */
.ext-tooltip-wrapper {
  position: relative;
}

.ext-tooltip {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  z-index: 100;
  text-align: left;
}

.ext-tooltip-wrapper:hover .ext-tooltip,
.ext-tooltip-wrapper:focus-within .ext-tooltip {
  display: block;
}

.ext-tooltip-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.ext-tooltip-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-primary);
}

.ext-tooltip-list li {
  margin-bottom: 2px;
}

.ext-tooltip-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  border: 1px solid var(--border-color);
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.project-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow: hidden;
  min-height: 34px;
}

.project-type-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.project-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  background: var(--success-bg);
  color: var(--success-color);
  white-space: nowrap;
}

.project-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.project-type-badge.axure {
  background: rgba(26, 115, 232, 0.1);
  color: #1a73e8;
}

.project-type-badge.react {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.project-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--bg-color);
  color: var(--primary-color);
}

.icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.icon-btn .icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn .icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.project-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.project-stats {
  display: flex;
  gap: 16px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-item .icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  color: var(--text-secondary);
  opacity: 0.5;
}

.empty-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.empty-state p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.7;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(0);
}

.modal-overlay.active {
  display: flex;
}

.edit-modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.edit-modal-large {
  max-width: 1000px;
}

.edit-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.edit-modal-header h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.edit-modal-body {
  padding: 24px;
  max-height: calc(85vh - 150px);
  overflow-y: auto;
}

.modal {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 480px;
  max-width: 90%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.2s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.close-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.close-btn:hover {
  background: var(--bg-color);
}

.close-btn .icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.close-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group .required {
  color: var(--danger-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--card-bg);
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.form-group input[type="file"] {
  padding: 0;
  border: none;
  background: transparent;
}

.form-group input[type="file"]::file-selector-button {
  padding: 6px 12px;
  border: 1px solid var(--primary-color);
  border-radius: var(--radius-sm);
  background: var(--primary-color);
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  margin-right: 8px;
}

.form-group input[type="file"]::file-selector-button:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

/* 项目类型选择器 */
.project-type-selector {
  display: flex;
  gap: 12px;
}

.type-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.type-option:hover {
  border-color: var(--primary-color);
}

.type-option input[type="radio"] {
  display: none;
}

.type-option:has(input:checked) {
  border-color: var(--primary-color);
  background: rgba(26, 115, 232, 0.08);
}

.type-option .type-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.type-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  margin-bottom: 0;
}

/* 编辑模式下禁用类型选择器 */
.project-type-selector.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.upload-progress {
  margin-top: 20px;
}

/* 三步骤进度样式 */
.upload-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upload-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.upload-step.active {
  border-color: var(--primary-color);
  background: rgba(59, 130, 246, 0.05);
}

.upload-step.completed {
  border-color: var(--success-color);
  background: rgba(34, 197, 94, 0.05);
}

.upload-step .step-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.upload-step.active .step-icon {
  background: var(--primary-color);
  color: white;
}

.upload-step.completed .step-icon {
  background: var(--success-color);
  color: white;
}

.upload-step .step-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-step .step-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.upload-step .step-status {
  font-size: 12px;
  color: var(--text-secondary);
}

.upload-step.active .step-status {
  color: var(--primary-color);
}

.upload-step.completed .step-status {
  color: var(--success-color);
}

.upload-step .step-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-progress-bar {
  width: 60px;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.mini-progress-fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.upload-step.completed .mini-progress-fill {
  background: var(--success-color);
}

.mini-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 35px;
  text-align: right;
}

.upload-detail-info {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
}

.detail-row:not(:last-child) {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.detail-label {
  color: var(--text-secondary);
}

.detail-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* 旧进度条样式保留兼容 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-color);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  text-align: center;
}

.chunked-upload-status {
  margin-top: 12px;
}

.upload-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.upload-stats span {
  flex: 1;
  text-align: center;
}

.upload-stats span:first-child {
  text-align: left;
}

.upload-stats span:last-child {
  text-align: right;
}

.upload-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.btn-small {
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-small.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-small.btn-danger:hover {
  background: var(--danger-hover);
}

.modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  backdrop-filter: blur(0);
}

.drawer-overlay.active {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: -600px;
  width: 600px;
  height: 100vh;
  background: var(--card-bg);
  transition: right 0.3s ease;
  z-index: 1001;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--card-bg);
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-project-name {
  display: none;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.drawer-close-btn:hover {
  background: var(--bg-color);
}

.drawer-close-btn .icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.drawer-section {
  margin-bottom: 24px;
}

.drawer-section:last-child {
  margin-bottom: 0;
}

.drawer-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.drawer-section-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.drawer-section-content {
  background: var(--bg-color);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--border-color);
}

.toggle-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 22px;
  background: var(--bg-tertiary);
  border-radius: 11px;
  transition: background 0.3s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 9px;
  transition: transform 0.3s;
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch {
  background: var(--primary-color);
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch::after {
  transform: translateX(22px);
}

.toggle-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.toggle-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 56px;
}

.public-link-section {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  margin-top: 16px;
}

.public-link-section label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.link-input-group {
  display: flex;
  gap: 8px;
}

.link-input-group input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 13px;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 13px;
}

.drawer-table-container {
  overflow-x: auto;
}

.drawer-member-table {
  width: 100%;
  border-collapse: collapse;
}

.drawer-member-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
}

.drawer-member-table td {
  padding: 12px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.drawer-member-table tbody tr:hover {
  background: var(--bg-hover);
}

.drawer-member-table tbody tr:last-child td {
  border-bottom: none;
}

.drawer-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.drawer-role-badge.owner {
  background: var(--primary-color);
  color: white;
}

.drawer-role-badge.editor {
  background: var(--success-bg);
  color: var(--success-color);
}

.drawer-role-badge.viewer {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.drawer-action-buttons {
  display: flex;
  gap: 6px;
}

.drawer-action-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.drawer-action-btn:hover {
  background: var(--bg-hover);
}

.drawer-action-btn.edit-btn {
  background: var(--primary-bg);
  color: var(--primary-color);
}

.drawer-action-btn.edit-btn:hover {
  background: var(--primary-hover);
}

.drawer-action-btn.delete-btn {
  background: var(--danger-bg);
  color: var(--danger-color);
}

.drawer-action-btn.delete-btn:hover {
  background: var(--danger-hover);
}

.drawer-empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-secondary);
}

.drawer-empty-state svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.drawer-empty-state p {
  font-size: 13px;
}

#drawer-add-member-modal,
#drawer-edit-role-modal {
  z-index: 1002;
}

#drawer-add-member-modal .modal,
#drawer-edit-role-modal .modal {
  width: 480px;
}

#drawer-add-member-modal .form-group,
#drawer-edit-role-modal .form-group {
  margin-bottom: 16px;
}

#drawer-add-member-modal .form-group:last-child,
#drawer-edit-role-modal .form-group:last-child {
  margin-bottom: 0;
}

#drawer-add-member-modal label,
#drawer-edit-role-modal label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

#drawer-user-select,
#drawer-role-select,
#drawer-edit-role {
  display: none;
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.custom-select-trigger:hover {
  border-color: var(--primary-color);
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.custom-select-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-text.placeholder {
  color: var(--text-secondary);
}

.custom-select-arrow {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  transition: transform 0.2s;
}

.custom-select-wrapper.open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  animation: dropdownSlideIn 0.15s ease;
}

.custom-select-wrapper.open .custom-select-dropdown {
  display: block;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-option {
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
}

.custom-select-option:hover {
  background: var(--bg-hover);
}

.custom-select-option.selected {
  background: var(--primary-bg);
  color: var(--primary-color);
}

.custom-select-option.selected:hover {
  background: var(--primary-hover);
}

.drawer-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 10px 16px;
  background: var(--slate-800);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: #fff;
  z-index: 10010;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.drawer.active .drawer-toast {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.drawer-toast.success {
  background: var(--success-600);
}

.drawer-toast.error {
  background: var(--danger-600);
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .modal {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }
  
  .drawer {
    width: 100%;
    right: -100%;
  }
}

.multi-select-wrapper {
  position: relative;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
}

.multi-select-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

.multi-select-selected-tags:empty::before {
  content: '请选择用户';
  color: var(--text-secondary);
  font-size: 14px;
  padding: 8px 12px;
}

.multi-select-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  min-height: 42px;
  border-bottom: 1px solid var(--border-color);
}

.multi-select-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--primary-bg);
  color: var(--primary-color);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  max-width: 150px;
}

.multi-select-tag-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-tag-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  color: var(--primary-color);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.multi-select-tag-remove:hover {
  background: var(--primary-color);
  color: white;
}

.multi-select-tag-remove svg {
  width: 12px;
  height: 12px;
}

.multi-select-search-wrapper {
  padding: 8px 12px;
}

.multi-select-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-color);
  transition: border-color 0.2s;
}

.multi-select-search:focus {
  outline: none;
  border-color: var(--primary-color);
}

.multi-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 100;
  display: none;
  margin-top: 4px;
}

.multi-select-dropdown.open {
  display: block;
}

.multi-select-dropdown .user-list-loading {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.multi-select-dropdown .user-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.multi-select-dropdown .user-item:hover {
  background: var(--bg-hover);
}

.multi-select-dropdown .user-item.selected {
  background: var(--primary-bg);
}

.multi-select-dropdown .user-item.highlighted {
  background: var(--bg-hover);
}

.multi-select-dropdown .user-checkbox {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  cursor: pointer;
  accent-color: var(--primary-color);
  flex-shrink: 0;
}

.multi-select-dropdown .user-info {
  flex: 1;
  min-width: 0;
}

.multi-select-dropdown .user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.multi-select-dropdown .user-display-name {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.member-list-container {
  min-height: 300px;
  max-height: 300px;
  overflow-y: auto;
}

.member-list-container .user-list-loading {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.member-list-container .user-item {
  display: flex;
  align-items: center;
  padding: 2px 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.member-list-container .user-item:hover {
  background: var(--bg-hover);
}

.member-list-container .user-item.selected {
  background: var(--primary-bg);
}

.member-list-container .user-item.highlighted {
  background: var(--bg-hover);
}

.member-list-container .user-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary-color);
  flex-shrink: 0;
}

.member-list-container .user-info {
  flex: 1;
  min-width: 0;
}

.member-list-container .user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.member-list-container .user-display-name {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.member-list-container .user-list-empty,
.member-list-container .user-list-no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

/* 已移除 .multi-select-dropdown 下拉样式，改用固定列表展示 */

.drawer-section-content .form-group {
  margin-bottom: 16px;
}

.drawer-section-content .form-group:last-child {
  margin-bottom: 0;
}

.drawer-section-content .form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.drawer-section-content .form-group input,
.drawer-section-content .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--card-bg);
  transition: border-color var(--transition-fast);
}

.drawer-section-content .form-group input:focus,
.drawer-section-content .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.drawer-section-content .form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.upload-type-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.upload-type-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-type-btn:hover {
  color: var(--primary-color);
}

.upload-type-btn.active {
  border-color: var(--primary-color);
  background: var(--primary-bg);
  color: var(--primary-color);
}

.upload-type-btn .btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-type-btn .btn-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.file-upload-area:hover {
  border-color: var(--primary-color);
  background: var(--primary-bg);
}

.file-upload-area.dragover {
  border-color: var(--primary-color);
  background: var(--primary-bg);
  transform: scale(1.01);
}

.file-upload-area.has-file {
  border-style: solid;
  border-color: var(--success-color);
  background: var(--success-bg);
}

.file-upload-icon {
  color: var(--text-secondary);
  margin-bottom: 12px;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-upload-area:hover .file-upload-icon {
  color: var(--primary-color);
  opacity: 1;
}

.file-upload-icon svg {
  width: 48px;
  height: 48px;
}

.file-upload-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.file-upload-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.selected-file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.selected-file-icon {
  color: var(--success-color);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selected-file-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.selected-file-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.selected-file-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file-size {
  font-size: 12px;
  color: var(--text-secondary);
}

.selected-file-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.selected-file-remove:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.selected-file-remove svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.form-hint {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.validation-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

.validation-modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.validation-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 16px;
  text-align: center;
}

.validation-header.error svg {
  color: #ef4444;
}

.validation-header.warning svg {
  color: #f59e0b;
}

.validation-header h2 {
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.validation-body {
  padding: 0 24px 24px;
}

.validation-message {
  margin: 0 0 16px;
  color: var(--text-primary);
}

.validation-section {
  margin-bottom: 16px;
}

.validation-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.validation-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #f9fafb;
  border-radius: var(--radius-md);
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.validation-list li {
  padding: 4px 0;
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
}

.validation-list li.more-items {
  color: var(--text-secondary);
  font-style: italic;
}

.validation-error {
  color: #ef4444;
  font-size: 14px;
  margin: 0 0 16px;
}

.validation-hint {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  background: #fef3c7;
  padding: 12px;
  border-radius: var(--radius-md);
}

.validation-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: #f9fafb;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.validation-footer .btn {
  min-width: 100px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.upload-error-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.2s ease;
}

.upload-error-modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.upload-error-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 16px;
  text-align: center;
}

.upload-error-header svg {
  color: #ef4444;
}

.upload-error-header h2 {
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-error-body {
  padding: 0 24px 24px;
}

.upload-error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #991b1b;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-family: inherit;
}

.upload-error-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: #f9fafb;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.upload-error-footer .btn {
  min-width: 100px;
}

/* 上传成功弹框样式 */
.upload-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.2s ease;
}

.upload-success-modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.upload-success-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 16px;
  text-align: center;
}

.upload-success-header h2 {
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-success-body {
  padding: 0 24px 24px;
}

.upload-success-message {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
}

.upload-success-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: #f9fafb;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.upload-success-footer .btn {
  min-width: 120px;
}

/* 构建成功弹框样式 */
.build-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.2s ease;
}

.build-success-modal-content {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.build-success-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 24px 16px;
  text-align: center;
}

.build-success-header h2 {
  margin: 16px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.build-success-body {
  padding: 0 24px 24px;
}

.build-success-message {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: center;
  margin: 0;
}

.build-success-footer {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  background: #f9fafb;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.build-success-footer .btn {
  min-width: 120px;
}

/* 构建日志区域 */
.build-logs-container {
  margin-top: 16px;
}

.build-logs-output {
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  padding: 12px;
  border-radius: var(--radius-md);
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.build-logs-output::-webkit-scrollbar {
  width: 6px;
}

.build-logs-output::-webkit-scrollbar-track {
  background: #2d2d2d;
}

.build-logs-output::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

.edit-modal .modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
