.search-modal {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    width: 560px;
    max-width: 90vw;
    background: var(--bg-primary);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
    flex-direction: column;
    animation: slideInRight 0.2s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.search-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  flex-shrink: 0;
}

.search-modal .modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.search-modal .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.search-modal .modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.search-modal .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.search-modal .modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-card);
  flex-shrink: 0;
}

.search-input-wrapper {
  margin-bottom: 20px;
}

.search-input-wrapper .form-input {
  width: 100%;
  height: 48px;
  font-size: 16px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
}

.filters-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.filters-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.filters-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  gap: 12px;
}

.filter-row .form-select {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
}

.filter-actions {
  margin-top: 12px;
  text-align: right;
}

.filter-actions .btn-link {
  background: none;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  font-size: 13px;
  padding: 6px 12px;
}

.search-stats {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.search-results {
  min-height: 200px;
}

.search-result-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 10px;
  background: var(--bg-card);
  transition: all 0.2s;
}

.search-result-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
  transform: translateX(4px);
}

.result-icon {
  font-size: 22px;
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-content {
  flex: 1;
  min-width: 0;
}

.result-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 6px;
  word-break: break-word;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.result-type {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 11px;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.result-tag {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.05);
}

.result-subtitle {
  color: var(--text-muted);
  font-size: 11px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state.small {
  padding: 16px;
  font-size: 13px;
}

.empty-state.error {
  color: var(--error);
}

@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
  }
  .filter-row .form-select {
    width: 100%;
  }
  .search-result-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .result-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .search-modal {
    width: 100%;
    max-width: 100%;
    right: 0;
  }
}